U++ framework
Do not panic. Ask here before giving up.

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 #28024 is a reply to message #27616] Fri, 13 August 2010 11:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
koldo wrote on Mon, 26 July 2010 03:50

Likewise, the same dpi detection would have to be added when reading a png file in bool PNGRaster::Init(), after png_read_info():

	png_read_info(data->png_ptr, data->info_ptr);
/// Begin
	png_uint_32 xres, yres;
	int unitType = PNG_RESOLUTION_METER;
	png_get_pHYs(data->png_ptr, data->info_ptr, &xres, &yres, &unitType);
	unsigned xdpi = unsigned(xres*0.0254);
	unsigned ydpi = unsigned(yres*0.0254);
/// End
	return true;


Here the question is where to put readed xdpy and ydpi in U++ code.


If you have this tested and working, please submit files as patch...

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: Sun Apr 26 17:02:21 GMT+2 2026

Total time taken to generate the page: 0.00809 seconds