Thumbnail picture

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Thumbnail picture

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:55 pm

by Brett Greiner >> Thu, 10 Nov 2005 22:46:48 GMT

Has anyone created a dynamic thumbnail picture from a larger image stored in the Jade database.
Looking for help in creating a thumbnail of a full size picture.

Cheers
Brett

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Thumbnail picture

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:55 pm

by Patwos >> Tue, 15 Nov 2005 2:13:14 GMT

I did this once, but I took the "lazy" approach of loading the image into a Picture control sized to my desired thumbnail size and with the stretch option set to "4 - Picture Proportional to Control". Then all the work required to "create" the thumbnail of the full size picture happens automatically. :)

Hope that helps,
Pat.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Thumbnail picture

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:55 pm

by Stephen >> Thu, 17 Nov 2005 23:53:08 GMT

We use an ActiveX to manipulate images.

We have a facility on our website, and thin client, where a user can upload a company logo. We then have an ActiveX that resizes it to a standard size, and creates a smaller thumbnail (converts it to a gif, regardless of what format they load it in), for use on the website.

Product we use is http://www.aurigma.com/Products/GraphicsProcessor/

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Thumbnail picture

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:55 pm

by Jared >> Tue, 7 Feb 2006 8:56:50 GMT

Try this:

vars
b : Binary;
begin
picture2.picture := picture1.picture; picture2.createPicture(true, true, 32);
b := p.picture;
b := b.convertPicture(Window.PictureType_Jpeg);
end;

Load in your picture into picture1, any settings are fine. Set picture2 stretch to "Picture To Control". Size picture2 either dynamically or in painter to the desired thumbnail size. When you 'createPicture' with 32bit colour it will take a 'snapshot' of the picture and keep the size. This will give you a thumbnailed picture of type bmp. Which has no compression so the pictures are pretty big, so copy the image into a binary variable and use the convertPicture method to convert it into a smaller format, in this case jpeg (you can also convert it to png or tiff). Then i guess do what you want with it. Save it to a file or transmit it etc...

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Thumbnail picture

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:55 pm

by Jared >> Tue, 7 Feb 2006 8:57:29 GMT

Try this:

vars
b : Binary;
begin
picture2.picture := picture1.picture; picture2.createPicture(true, true, 32);
b := p.picture;
b := b.convertPicture(Window.PictureType_Jpeg);
end;

Load in your picture into picture1, any settings are fine. Set picture2 stretch to "Picture To Control". Size picture2 either dynamically or in painter to the desired thumbnail size. When you 'createPicture' with 32bit colour it will take a 'snapshot' of the picture and keep the size. This will give you a thumbnailed picture of type bmp. Which has no compression so the pictures are pretty big, so copy the image into a binary variable and use the convertPicture method to convert it into a smaller format, in this case jpeg (you can also convert it to png or tiff). Then i guess do what you want with it. Save it to a file or transmit it etc...


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 37 guests