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

Notification

Icon
Error

Options
Go to last post Go to first unread
stefanmees  
#1 Posted : Sunday, January 29, 2006 9:59:55 PM(UTC)
stefanmees

Rank: Member

Groups: Member
Joined: 1/29/2006(UTC)
Posts: 1

Hello, i have several Problems with Graphics Mill... here is what i want to do. I will have a Graphics Konverter "PNG" to "SWF" run in a managed PowerPoint Add-In. Here is the sample code i have used.
Code:
using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap( png ) )
{
  bitmap.Save( swf ,new Aurigma.GraphicsMill.Codecs.SwfEncoderOptions( 75 ) );
}
If i used the Version 3.1 i get a "SynchronizationLockException" (line "new Aurigma.GraphicsMill.Bitmap...." ). In this forum thread (http://www.everythingcyber.com/Forums/Topic510-15-1.aspx) i read about this problem... and you recommend to upgrade to Version 3.5RC (http://www.everythingcyber.com/...pic3122-16-1.aspx#bm3122). But when i use this Version i get a "UnsupportedPixelFormatException" (line "bitmap.save..."). I attached the png to this thread so you can test it. Thanks for you suggestions and best from Germany!

Edited by user Thursday, December 20, 2007 5:16:25 PM(UTC)  | Reason: Not specified

stefanmees attached the following image(s):
test.png
Dmitry  
#2 Posted : Monday, January 30, 2006 9:30:57 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello, As I understood you try to save image to SWF format with JPEG compression. This compression supports the following pixel formats: 24bppRgb, 32bppArgb, 32bppCmyk, 40bppAcmyk, 8bppGrayscale, 16bppAlphaGrayscale. Your sample PNG file has 8bppIndexed pixel format, which is not supported by SWF format with JPEG compression. You just need to convert pixel format as it is shown in the following code snippet:
Code:
using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(@"c:/test.png"))
{  
	bitmap.ColorManagement.Convert(Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);
	bitmap.Save(@"c:/test.swf",new Aurigma.GraphicsMill.Codecs.SwfEncoderOptions(75));
}

Edited by user Thursday, December 20, 2007 5:16:54 PM(UTC)  | Reason: Not specified

Sincerely yours, Dmitry Sevostyanov UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.