Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to set the dpi (dots per inch) of an image
Re: How to set the dpi (dots per inch) of an image [message #28591 is a reply to message #28201] Wed, 08 September 2010 09:17 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Sun, 22 August 2010 17:51

Hello Mirek

I mean now there are no methods to set or get the vertical or horizontal dpi of an image.



But there are are!

Raster::GetInfo returns Info, which in turn has "dots" member, which is physical size of image (in dots).

Combine with "GetSize" and you get dpi information.

The other way is RasterEncoder::SetDots. (Again, combined with SetSize, you have dpi info).

The only issue is that plugins might be lacking the support of this information.

Well, now thinking, perhaps we could add Raster::GetDpi a RasterEncoder::SetDpi methods, but that would only be very oneliners/helpers. Plus, SetDpi would need Create to be called first. Hm, perhaps there should be alternate Create with dpi info.

Anyway, these would really be just helpers. The basic info and interface is already there!

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Icon at right side of the menuBar
Next Topic: GetExifThumbnail doc
Goto Forum:
  


Current Time: Thu Mar 28 18:31:14 CET 2024

Total time taken to generate the page: 0.01157 seconds