Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
2
Erster Beitrag:
vor 1 Jahr, 2 Monaten
Letzter Beitrag:
vor 1 Jahr, 2 Monaten
Beteiligte Autoren:
Curtis

[WD20] Automatic Thumbnail on Image Field

Startbeitrag von Curtis am 21.07.2016 15:00

Is there a way to get a thumbnail of an image field from an SQL query?


IMG_Product = Product.Image // Gets full image even though the control is 135 x 90 pixels
IMG_Product = Product.Image..Thumbnail // Works, gets the 320x320 auto thumbnail
IMG_Product = dsResult.Image..Thumbnail // Doesn't work, gets no image


Also, is there a way to generate thumbnails for all of the Product records that already have an image? Edit 2: HModify() did not work like the documentation said it would.

EDIT: Just curious, has anyone had any major issues with automatic thumbnails?

EDIT 2: After reading some past posts, it seems I need to query my products without getting the image. Then I need to HReadSeek() to each product and HExtractMemo(). Will HExtractMemo() automatically retrieve only the thumbnail? display in an image control with IMG_Product = Product.Image..Thumbnail. I am loading thumbnails in a looper so I don't need to use HExtractMemo().

Thanks!

Antworten:

So far it seems like my looper is going to load a lot faster if I use my own image memo field. When I create a product I save the high quality image to Product.Image. Then I load the image in an off-window image control with the resolution I want for my thumbnail. Then I save it to a file with dSaveJpeg(). Finally I save that lower resolution file to Product.ImageThumbnail.

I get all Product.ImageThumbnail in my SQL query when loading my looper control. This seems to be faster than using automatic thumbnails.

von Curtis - am 21.07.2016 20:12
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.