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 #28711 is a reply to message #28670] Mon, 13 September 2010 17:33 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 10 September 2010 07:42

koldo wrote on Fri, 10 September 2010 11:41

Hello Mirek

Quote:

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


Perhaps instead of in "dots" do you mean in meters?. This way info.dots would be the physical image Size in meters.


Hello Mirek

I have seen that in U++ a dot is 1/600 of a pixel.

Now U++ stores for an image the Size in pixels and in dots.

This cause problems as if I rescale an image or set a new image with part of other, the Size in dots is lost or remains the same, so the image really has badly changed its resolution Sad.

Really if an image is scanned, the size in dots and in pixels is the same... The only thing that is different is the size of the dot in inches or meters.

Would not be better to store image Size in pixels and resolution in dpi or dpm?. This way if we process an ImageBuffer, the size will change but the resolution will remain (but if we explicitly want to change it)


Everything has some tradeoff. It is true that if it gets stored as dpi, it holds after scaling.

OTOH, if you ever are going to scale the image, usually the original size either does not matter, or you just use dots as basis for scaling. In fact, any true WYSIWIG works in dots and effectively in dot = pixel mode, you tend to place images in target dots coordinates (which, for screen, are somewhat rescaled), so it is not a big deal.

In any case, it is a bit too late to change this now, even if dpi info might be somewhat better.
 
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: Fri Apr 19 14:59:45 CEST 2024

Total time taken to generate the page: 0.02659 seconds