Creating "real" thumbnails w/ compression control
Klaus Major
k_major at os.surf2000.de
Sun Jan 26 06:46:01 EST 2003
Hi Swami,
> I followed the recent thread on making thumbnails, but still have a
> basic question. Of course, it possible to import a large digital JPEG
> image (typically taken by a digital camera, 20 X 14 at 100 DPI or
> something like that), and assign that image to a small rect that is
> locked and thus it appears as a thumbnail. The questions are
>
> 1) How does one go about actually making a thumbnail of the large
> image that resides on disk, but, in Revolution the amount of image
> data for the thumbnail is just that, the necessary data to show a
> thumbnail.. let's say 1 inch tall by 2 inches wide, for discussion
> purposes... at 72 DPI. So that when you export that thumbnail back to
> the hard drive you end up with a tiny 20K thumbnail image of the large
> image?
SInce RR will always display images in 72 dpi (screen resolution, only
some specific
image editors like Photoshop etc... really do know what other
resolutions "mean",
same for most computer-users ;-) you could "stuff" such a high res
image into
a small locked image object, do some calculations with "the
formattedheight of img x" and
"the formattedwidth of img x" to determine the correct proportional
scaling for that image object.
> 2) Can we import a JPEG and then export that big file back to a
> smaller file and a specific smaller size and compression. e.g. we
> bring in the file and save it out as a 3X5 image at 72 DPI at
> compression "medium" or 40.
I think you can just export a screenshot from the rect of that image as
jpeg.
See "export" and "jpegquality"...
Shouldn't be too complicated ;-)
> Sannyasin Sivakatirswami
> Himalayan Academy Publications
> at Kauai's Hindu Monastery
> katir at hindu.org
Hope that helps.
Regards
Klaus Major
k_major at os.surf2000.de
More information about the use-livecode
mailing list