This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
Noufal123  
#1 Posted : Wednesday, March 31, 2010 2:31:12 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
Hello, I am doing project in c# with aurigma tool. I wana convert DAT file to JPG .Any idea?
Fedor  
#2 Posted : Wednesday, March 31, 2010 3:08:28 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

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

Quote:
Hello, I am doing project in c# with aurigma tool. I wana convert DAT file to JPG .Any idea?


Could you attach here or submit a case with an example of DAT file?
Best regards,
Fedor Skvortsov
Noufal123  
#3 Posted : Wednesday, March 31, 2010 7:49:19 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
Actually DAT file is created, when the MultiLayerBitmap viewer(Aurigma tool) image is saved.It contains Different Layers...........
Dmitry  
#4 Posted : Thursday, April 1, 2010 1:46:08 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

You need to load this file to MultiLayerViewer and then render its content to a bitmap. After that you may save this bitmap to Jpeg format. The How to Use Vector Objects topic will give you detailed information on this task.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Noufal123  
#5 Posted : Thursday, April 1, 2010 4:08:33 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
Thanx, I have converted and saved the Image into bitmap , but i have tried to draw bitmap image into a Bitmapviewer by using code "bitmap.Draw(bmpViewer2.Bitmap, 10, 10, CombineMode.Alpha);". It shows an exception as follows,



"Aurigma.GraphicsMill.BitmapEmptyException: Bitmap "destinationBitmap" has not been filled up with data.
at Aurigma.GraphicsMill.Bitmap._Draw(Bitmap destinationBitmap, Single destinationX, Single destinationY, Single destinationWidth, Single destinationHeight, Single sourceX, Single sourceY, Single sourceWidth, Single sourceHeight, CombineMode combine, Single opacity, InterpolationMode interpolationMode)
at Aurigma.GraphicsMill.Bitmap.Draw(Bitmap destinationBitmap, Int32 destinationX, Int32 destinationY, Int32 destinationWidth, Int32 destinationHeight, CombineMode combine, Single opacity, InterpolationMode interpolationMode)
at Aurigma.GraphicsMill.Bitmap.Draw(Bitmap destinationBitmap, Int32 destinationX, Int32 destinationY, CombineMode combine)
at SampleAuriga.Form1.SaveImage() in E:\SampleAuriga\SampleAuriga\Form1.cs:line 328"

Edited by user Thursday, April 1, 2010 4:09:05 PM(UTC)  | Reason: Not specified

Dmitry  
#6 Posted : Sunday, April 4, 2010 7:46:08 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Could you provide full code snippet used to draw an image onto BitmapViewer?
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Noufal123  
#7 Posted : Sunday, April 4, 2010 8:30:05 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
Yes............


bmpviewer1.Height = Convert.ToInt32(multiLayerViewer1.WorkspaceHeight);
bmpviewer1.Width = Convert.ToInt32(multiLayerViewer1.WorkspaceWidth);
Aurigma.GraphicsMill.Bitmap bitmap = multiLayerViewer1.RenderWorkspace();
bitmap.Draw(bmpViewer2.Bitmap, 10, 10, CombineMode.Alpha);
bitmap.Dispose();

Edited by user Sunday, April 4, 2010 8:39:15 PM(UTC)  | Reason: Not specified

Dmitry  
#8 Posted : Sunday, April 4, 2010 10:18:53 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
What is BitmapViewer2? Does it display an image at the moment when you call bitmap.Draw(bmpViewer2.Bitmap,...?
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Noufal123  
#9 Posted : Sunday, April 4, 2010 11:16:32 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
bmpViewer2 is " Aurigma.GraphicsMill.WinControls.BitmapViewer" .actually i want to draw and display the bitmap image in this bmpViewer2 which is produced by a multilayer bitmapviewer ...Can i able to draw this image to any other forms? How can i give different solid colors to background of image in multilayer viewer? pls help me with sample codes...

Edited by user Monday, April 5, 2010 2:17:44 AM(UTC)  | Reason: Not specified

Alex Kon  
#10 Posted : Monday, April 5, 2010 9:49:11 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Guest
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

In the code above the issue is that bmpViewer2.Bitmap object is empty, so you cannot draw anything to it. Try to add something like that:
Code:
bmpViewer2.Bitmap.Create(Aurigma.GraphicsMill.RgbColor.Red, bitmap.Width + 10, bitmap.Heigth + 10, Aurigma.GraphicsMill.PixelFormat.Format24BppRgb);
before Draw(...) call.

However, as Dmitry said, it is not the best idea to draw image directly to the currently displayed image. In most cases it is better to draw to some off-screen Bitmap, and then display it to user.

Best regards,
Alex Kon
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.