Code Comments
Programming Forum and web based access to our favorite programming groups.I have several programs that allow the end user to attach photos (as blobs) to individual records. However, since the images actually become part of the file, even a small 320x240 72dpi jpg image has a great impact on the size of the file (from 8k to 267k with just one image). Is there anyway to attach the images without enlarging the file so drastically? (C5b) Respond this thread only. The email address is outgoing only. Doug Scott Scotware
Post Follow-up to this messageTry adding:
?Image1{Prop:PrintMode} = 3
PHO:Photograph{Prop:Handle} = ?Image1{Prop:ImageBlob}
just before the insert, now as you can see, this example assumes that
the photo was placed in an image container first. This will store the
photo in it's native format. Which will save a lot of overhead.
Hope this helps!
James Neill
D. Scott wrote:
> I have several programs that allow the end user to attach photos (as
> blobs) to individual records. However, since the images actually
> become part of the file, even a small 320x240 72dpi jpg image has a
> great impact on the size of the file (from 8k to 267k with just one
> image). Is there anyway to attach the images without enlarging the
> file so drastically? (C5b)
>
> Respond this thread only. The email address is outgoing only.
> Doug Scott
> Scotware
Post Follow-up to this messageD. Scott wrote: > I have several programs that allow the end user to attach photos (as > blobs) to individual records. However, since the images actually > become part of the file, even a small 320x240 72dpi jpg image has a > great impact on the size of the file (from 8k to 267k with just one > image). Is there anyway to attach the images without enlarging the > file so drastically? (C5b) > > Respond this thread only. The email address is outgoing only. > Doug Scott > Scotware
Post Follow-up to this messageJim, Works great! Also added it to the image update embed so that the existing large records could take advantage of the reduction. I presume the magic is in the printmode = 3. I don't understand what it's doing, just that it works. Thanks again Doug
Post Follow-up to this messageThe printmode = 3 instructs your application to save the photo in its native format, by default it is converted to a bmp which takes up a lot more real estate on the hard disk. James Neill D. Scott wrote: > Jim, > > Works great! Also added it to the image update embed so that the > existing large records could take advantage of the reduction. I > presume the magic is in the printmode = 3. I don't understand what > it's doing, just that it works. > > Thanks again > Doug
Post Follow-up to this messageJim, OK, the part about the "bloated" bmps makes sense (although I didn't know the images were being converted). Also, realized the only way to reduce the already attached photos was to "reattach" them, so the extra embeds were not needed. Thanks again, Doug
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.