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 

Working with Picture.Data

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
TADONKI Claude
Guest





PostPosted: Fri Feb 13, 2004 10:13 am    Post subject: Working with Picture.Data Reply with quote



Hi,
I am looking for a way to get the image from the Picture.Data variable
of a form (available in the .dfm version). The value of this variable is
a suceesion of capital letters with numbers. Suppose you have this in a
AnsiString variable and want to get the image in TGraphic variable. What
is the correct command ?
Thanks for any help,
Claude

Back to top
Ronald Loonstra
Guest





PostPosted: Fri Feb 13, 2004 5:08 pm    Post subject: Re: Working with Picture.Data Reply with quote



Hi Claude,

If your goal is to put the content of a TPicture in a TGraphic the function
Assign() will suffice, f.e:
graphic->Assign(Form1->Image1->Picture->Bitmap);

HTH
Ronald

"TADONKI Claude" <claude.tadonki (AT) unige (DOT) ch> schreef in bericht
news:402CA366.3C408824 (AT) unige (DOT) ch...
Quote:
Hi,
I am looking for a way to get the image from the Picture.Data variable
of a form (available in the .dfm version). The value of this variable is
a suceesion of capital letters with numbers. Suppose you have this in a
AnsiString variable and want to get the image in TGraphic variable. What
is the correct command ?
Thanks for any help,
Claude




Back to top
TADONKI Claude
Guest





PostPosted: Fri Feb 13, 2004 5:17 pm    Post subject: Re: Working with Picture.Data Reply with quote



Thanks for your reply,
but my goal is to get back an image from the Picture.Data variable of the .dfm
version. I am interested in uderstanding the encoding used to store the image
permanently inside a form, and try to manipulate it as desired.
Regards,
Claude

Back to top
Ronald Loonstra
Guest





PostPosted: Fri Feb 13, 2004 11:44 pm    Post subject: Re: Working with Picture.Data Reply with quote

Claude,

Can't help you too much with this..
I took a look at a small bitmap:
The dfm says:
Picture.Data = {
07544269746D6170BE000000424DBE0000000000000076000000280000000A00
000009000000010004000000000048000000D40E0000D40E0000100000001000
000000000000BDBDBD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00111111111100200010011110010020001100110011007000111000011100
720011110011110000F011100001110079001100110011006500100111100100
6C001111111111006900}

Loading the bitmap file directly in a texteditor:
BM¾ v (
  H Ô Ô   ½½½ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ
ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ ÿÿÿ      p   r   ð  y  
 e  l  i

So it looks to be a hexadecimal representation of (in this case) a bitmap
structure: the ascii-value of "BM" is hex 424D. The ascii-value of "i" = hex
69. Don't know what the header (all values before "BM") represents.
The structure will differ with all the different image-formats which can be
stored in a .dfm: jpeg, gif etc., depending of any (3rd-party)
image-libraries you may have installed.

Maybe someone else can enlighten you more?
Greetings,
Ronald

"TADONKI Claude" <claude.tadonki (AT) unige (DOT) ch> schreef in bericht
news:402D06BB.974973D4 (AT) unige (DOT) ch...
Quote:
Thanks for your reply,
but my goal is to get back an image from the Picture.Data variable of the
..dfm
version. I am interested in uderstanding the encoding used to store the
image
permanently inside a form, and try to manipulate it as desired.
Regards,
Claude




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (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.