Welcome Guest Search | Active Topics | Members

Several Problems... Options
stefanmees
Posted: Monday, January 30, 2006 5:59:55 AM
Rank: Member
Groups: Member

Joined: 1/30/2006
Posts: 1
Points: 0
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/Forums/Topic3122-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!


stefanmees attached the following image(s):
test.png

Dmitry
Posted: Tuesday, January 31, 2006 5:30:57 AM
Rank: Advanced Member
Groups: Administration , Member

Joined: 8/3/2003
Posts: 586
Points: 588
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));
}


Sincerely yours,
Dmitry Sevostyanov.
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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.