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 |
|
mirek
Messages: 13975 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
|
|
|
|
|
How to set the dpi (dots per inch) of an image
By: koldo on Thu, 15 July 2010 11:07
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Sat, 17 July 2010 09:58
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Mon, 19 July 2010 10:03
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Fri, 23 July 2010 11:37
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Sat, 24 July 2010 11:08
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Mon, 26 July 2010 09:50
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Fri, 13 August 2010 11:13
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Fri, 13 August 2010 13:46
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Sun, 22 August 2010 23:51
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Wed, 08 September 2010 09:17
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Fri, 10 September 2010 11:41
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Fri, 10 September 2010 13:42
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Mon, 13 September 2010 17:33
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Mon, 13 September 2010 21:56
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Tue, 14 September 2010 09:51
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Wed, 15 September 2010 09:17
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Wed, 15 September 2010 13:38
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Wed, 15 September 2010 15:02
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Thu, 16 September 2010 23:49
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Fri, 17 September 2010 09:58
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Fri, 17 September 2010 10:39
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: mirek on Fri, 17 September 2010 20:17
|
|
|
Re: How to set the dpi (dots per inch) of an image
By: koldo on Fri, 17 September 2010 22:29
|
Goto Forum:
Current Time: Sat Apr 20 00:27:06 CEST 2024
Total time taken to generate the page: 2.05523 seconds
|