BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TJpegImage

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Enquiring Mind
Guest





PostPosted: Mon May 14, 2007 9:59 pm    Post subject: TJpegImage Reply with quote



Hi,

Can anyone clarify the following points about a TJpegImage object whose data
has been assigned by calling the LoadFromFile method:

1) does it contain both the compressed source data loaded from file and the
expanded bitmap data, or only one of the two?
2) When it is assigned to a Graphic property of a Picture component, does it
retain the compressed source data, or is this lost when the source data is
converted to a fully populated bitmap image?

Thanks,

Enquiring Mind
Back to top
Reiner
Guest





PostPosted: Tue May 15, 2007 6:06 am    Post subject: Re: TJpegImage Reply with quote



"Enquiring Mind" <Enquiring.Mind (AT) nospam (DOT) btopenworld.com> wrote in message
news:46489533$1 (AT) newsgroups (DOT) borland.com...
Quote:
1) does it contain both the compressed source data loaded from file and
the
expanded bitmap data, or only one of the two?

It contains only the compressed data (doesn't decompress until needed).

Quote:
2) When it is assigned to a Graphic property of a Picture component, does
it
retain the compressed source data, or is this lost when the source data is
converted to a fully populated bitmap image?

It retains the compressed information and if you call
TJpegImage.SaveToStream is should be exactly the same as what you loaded
(ie. doesn't recompress if it already has compressed jpeg data).
Back to top
Enquiring Mind
Guest





PostPosted: Tue May 15, 2007 3:04 pm    Post subject: Re: TJpegImage Reply with quote



"Reiner" <slugu (AT) yahoo (DOT) com> wrote in message
news:4649075e (AT) newsgroups (DOT) borland.com...
Quote:

It contains only the compressed data (doesn't decompress until needed).

It retains the compressed information and if you call
TJpegImage.SaveToStream is should be exactly the same as what you loaded
(ie. doesn't recompress if it already has compressed jpeg data).


Many thanks for the clarifications.There are still a few further details

that I am unclear about:

1) Is the fully decompressed data owned not by the TJpegImage object, but
only by a Bitmap or TPicture object to which the TJpegImage object has been
assigned?

2) If uncompressed data is assigned to a newly created TJpegImage object, to
which a CompressionQuality value is later assigned, can the data *only* be
compressed by calling the Compress method, or does the data get compressed
automatically in the methods SaveToFile and SaveToStream?

3) After calling the Compress method, does the data in the TJpegImage object
exist in compressed format only?

4) Does the method TJpegImage.SaveToClipboardFormat copy the compressed or
uncompressed data to the clipboard?

5) The on-line help for TJpegImage.SaveToClipboardFormat states that "Before
the jpeg image can be saved, an application must have registered the format
with the TJPEGImage object using the RegisterClipboardFormat method." Does
this refer to the Windows API function RegisterClipboardFormat, or the
TPicture.RegisterClipboardFormat, or both?

6) In general, does the TPicture.RegisterClipboardFormat *not* register an
image format with Windows, but just set up an association between a Windows
Clipboard Format number and a TGraphic class? So in the case of a JpegImage,
one would first need to call the RegisterClipboardFormat API function to
obtain a clipboard format number, then call TPicture.RegisterClipboardFormat
to associate that format number with the TJpegImage class?

On a different but analogous subject, in Delphi 7 are there any facilities
for handling GIF and PNG files in a similar way to JPeg files? I have read
that in .Net graphics, a picture object may be loaded from any common type
of graphics file including .jpg, .png, ,gif, etc.

Many thanks,

Enquiring Mind
Back to top
Reiner
Guest





PostPosted: Mon May 21, 2007 8:11 am    Post subject: Re: TJpegImage Reply with quote

I'd have to check your queries in jpeg.pas, which I don't have time to do.
Guess nobody else had time either. If you have a pro version you can check
it yourself.

"Enquiring Mind" <Enquiring.Mind (AT) nospam (DOT) btopenworld.com> wrote in message
news:46498595 (AT) newsgroups (DOT) borland.com...
Quote:
Many thanks for the clarifications.There are still a few further details
that I am unclear about:
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.