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 #27616 is a reply to message #27584] Mon, 26 July 2010 09:50 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
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.


Best regards
IƱaki
 
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 26 08:51:24 CEST 2024

Total time taken to generate the page: 0.04868 seconds