Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
jcl  
#1 Posted : Tuesday, August 24, 2004 9:57:00 PM(UTC)
jcl

Rank: Member

Groups: Member
Joined: 5/27/2004(UTC)
Posts: 7

I am trying to get a bitmap from a picturebox into a Graphic Mills bitmap. I have done:

Gmills.Bitmap.Data.Picture = PictureBox.picture

I have verified that there is data in the PictureBox (by displaying it)

It appears that something was transfered as the height and width of the Gmills bitmap matches
that of the PictureBox. When I go to display the Gmills bitmap (via DrawOnHdc) nothing (the background doesn't change at all) gets displayed. Following the same code logic, if I create a new bitmap with a solid color instead of doing the above assignment, the solid color gets displayed. I have also tried converting to 32 bppArgb as well. Any Ideas?
Andrew  
#2 Posted : Wednesday, August 25, 2004 9:07:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
When Graphics Mill converts Picture into Bitmap, it converts it to 32-bit ARGB pixel format. Due some bug it sets 0 as alpha channel instead of 255. That's why the image gets transparent.

The workaround is either to convert Bitmap into 24-bit RGB:

Code:
Set Picture1.Picture = LoadPicture("d:\[test files]\pictures\ramones.jpg")
BitmapViewer1.Bitmap.Data.Picture = Picture1.Picture
BitmapViewer1.Bitmap.Data.ConvertTo24bppRgb


or set alpha channel to 255:

Code:
Set Picture1.Picture = LoadPicture("d:\[test files]\pictures\ramones.jpg")
BitmapViewer1.Bitmap.Data.Picture = Picture1.Picture
BitmapViewer1.Bitmap.ColorAdjustment.ChannelBalance 255, 0, 0, 0


Hopefully this will help. Please let me know if you still experience a problem.

Edited by user Monday, December 24, 2007 4:59:42 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.