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

Notification

Icon
Error

Options
Go to last post Go to first unread
ChristianGad  
#1 Posted : Sunday, July 3, 2005 12:51:00 AM(UTC)
ChristianGad

Rank: Member

Groups: Member
Joined: 7/3/2005(UTC)
Posts: 6

Thanks: 1 times
How can I load an image from System.Drwaing.Bitmap
Fedor  
#2 Posted : Sunday, July 3, 2005 1:17:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hello,

There are 2 ways to load System.Drawing.Bitmap image into Aurigma.GraphicsMill.Bitmap one:

1. You can pass System.Drawing.Bitmap in Aurigma.GraphicsMill.Bitmap constructor.

Code:
Dim gdiPlusBitmap As System.Drawing.Bitmap

'some other code...

Dim gmBitmap As Aurigma.GraphicsMill.Bitmap = _
    New Aurigma.GraphicsMill.Bitmap(gdiPlusBitmap)

Code:
System.Drawing.Bitmap gdiPlusBitmap;

//some other code...

Aurigma.GraphicsMill.Bitmap gmBitmap = 
    new Aurigma.GraphicsMill.Bitmap(gdiPlusBitmap);

2. You can cast System.Drawing.Bitmap to Aurigma.GraphicsMill.Bitmap as implicit type casting is supported:

Code:
Dim gdiPlusBitmap As System.Drawing.Bitmap

'some other code...

Dim gmBitmap As Aurigma.GraphicsMill.Bitmap = gdiPlusBitmap

Code:
System.Drawing.Bitmap gdiPlusBitmap;

//some other code...

Aurigma.GraphicsMill.Bitmap gmBitmap = gdiPlusBitmap;

Please note that in both cases image memory is copied.

Edited by user Tuesday, January 1, 2008 5:22:08 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

Fedor  
#3 Posted : Sunday, July 3, 2005 1:22:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
I just want to add that in order to convert Aurigma.GraphicsMill.Bitmap to System.Drawing.Bitmap you can use the same way implicit type casting or use ToGdiplusBitmap and ToGdiplusBitmapDirectly methods.

When you use ToGdiplusBitmapDirectly method, returned System.Drawing.Bitmap references to the same bitmap data as the current Aurigma.GraphicsMill.Bitmap class instance.

Edited by user Tuesday, January 1, 2008 5:23:10 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

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.