[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12[3]45678910 ]

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 20:13:34 09/17/03 Wed
Author: Michel
Subject: Re: ImageScrollBox and TJpegImage
In reply to: Stampfli Heinz 's message, "Re: ImageScrollBox and TJpegImage" on 15:16:48 09/17/03 Wed

Hi Heinz,

>When I try to compile it. It gives an Error:
>"Incompatible types: TDipGraphic and TJpegImage"

This is my error.


should work.

TGraphic is the VCL base class for all graphic. TBitmap, TJpegImage is derived from TGraphic. TDibGraphic is the base Envision class, derived from TGraphic. All Envision graphic classes are derived from TDibGraphic.

TDibGraphic.Assign() will accept any TGraphic derived class, so it should work with TJpegImage. I don't recall trying it so let me know how it goes.

>I have rewritten the Function
>ExtractThumbnailJpeg() that it uses TJpegGraphic
>within the Library EnJpgGr. When I try to load,
>nothing happens (no error).

Just as a test, if you try

ExtractThumbnailJpeg.SaveToFile('c:\testfile.jpg') is the resulting file a valid JPEG file?

>What is the diffrent from TDipGraphic and TGraphic.
>Can I convert them from one to the other?

See my comment above. You can use TDibGraphic.Assign(...) with any TGraphic derived class.

>When I load a JPEG into a TImage I also can't assign
>it to a TImageScrollBox.

You can try this,


>Without Envision (only with the unit jpeg) dEXIF does
>work together with TImage to load the extracted
>I would program the whole Application with Envision

If you are still having problems, the best way for me to help you would be to send me a small sample project, that has all the necessary source files.

Best regards,


>>Hi Heinz,
>>I have not used dEXIF so I may need more information.
>>function TImgData.ExtractThumbnailJpeg: TJpegImage;
>>work properly?
>>You can try this,
>> JpegImage : TJpegImage;
>> ...
>> JpegImage := ImgData.ExtractThumbnailJpeg;
>> ImageScrollBox.Graphic := JpegImage;
>> JpegImage.Free;
>> ...
>>Do you get any error message?
>>Best regards,
>>>Hello Michel
>>>This kind of Code I have already tried.
>>>I would like to extract the thumbnail with dEXIF
>>>(<a rel=nofollow target=_blank href="http://mcguirez.homestead.com/downloads.html)">http://mcguirez.homestead.com/downloads.html)</a> and
>>>assign it to the imagescrollbox.
>>>In dEXIF it uses the library jpeg. I have also
>>>rewritten the function to use TJpegGraphic from
>>>EnJpgGr. It doesn't work, too.
>>>The Function in dEXIF that extract the Jpeg
>>>function TImgData.ExtractThumbnailJpeg: TJpegImage;
>>>var ti:TJPEGImage;
>>> x:TStringStream;
>>> tb:string;
>>> result := nil;
>>> if HasThumbnail and (ExifObj.ThumbType =
>>> begin
>>> tb := ExtractThumbnailBuffer();
>>> if (tb = '') then
>>> exit;
>>> x := TStringStream.Create(tb);
>>> ti := TJPEGImage.Create;
>>> x.Seek(0,soFromBeginning);
>>> ti.LoadFromStream(x);
>>> x.Free;
>>> result := ti;
>>> end;
>>>Have you any other advice.
>>>Kind Regards
>>>>Hi Heinz,
>>>>Try this,
>>>>Best regards,
>>>>>How do I assign a TJpegImage into a ImageScrollBox
>>>>>with Envision 2.0.1. Can you give me an example?
>>>>>Kind Regards
>>>>>Heinz Stampfli

[ Next Thread | Previous Thread | Next Message | Previous Message ]


[ Contact Forum Admin ]

Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.