Handlers for reading/writing image density info in PNG/JPEG?
john at splash21.com
Fri Jun 13 06:54:23 EDT 2014
Hi, Trevor. Check out http://splash21.com/downloads/sQuiRtGPL.zip
There's a function in the library for creating PNG images and also the
required functions for deflate compression and crc32 checksums - maybe
those will help you getting started on the PNG side of things.
On 12/06/2014 18:16, Trevor DeVore wrote:
> Hi everyone,
> Now that LiveCode has high-dpi support we can create images using export
> snapshot whose physical pixels dimensions are not the dimensions the image
> should be displayed at. For example, on an OS X retina computer with a
> screen pixel scale of 2 you could create an image that has 600x300 pixels
> of data but should be displayed at 300x150.
> Currently the engine does not provide a way to embed the pixel density
> information in the PNG/JPEG files that it can create. In addition, the
> engine cannot read pixel density information from images on the clipboard.
> This means we can't determine what dimensions the clipboard image should be
> displayed at.
> I'm wondering if anybody has already created handlers for reading and
> writing pixel density information to JPEG and PNG data that they would be
> willing to share?
> If not I'll take a look at the file formats and come up with something but
> if someone already did this that would be great.
More information about the Use-livecode