Joe replied:
Dim p As Picture
p = NewPicture( myJPEG.width, myJPEG.height, 32 )
p.graphics.DrawPicture myJPEG, 0, 0
Now, p is in a format you can stuff into a PICT resource.
Me:
Thanks for the code Joe, I'll try it and let you know how it works. You know, I
messed with the NewPicture Method but couldn't get it to work. I see now I
didn't know enough to include the p.graphics.DrawPicture method that your code
has.
Joe:
But you never answered how you're adding this item to your resource fork.
Depending on what RB method you're using to do this, it's possible
that RB should do the conversion for you.
There's only one method described in the User's Manual, at least that I noticed.
//These are the lines that set up the file
S=f.CreateBinaryFile("type")
rf=f.CreateResourceFork("type")
//and this is the line that puts the pics into the resource.
rf.AddPicture(p, resource#, "pName")
I'll be interested in knowing what other ways there are for adding items to a
resource fork.
Thank you Joe!!
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|