Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Scaling an image with PixelFormat of Rgb32 corupts image
Rank: Newbie
Groups: Guest
Joined: 7/16/2009(UTC) Posts: 7
|
I have an image, which is copied from a regular System.Drawing.Bitmap and rendered into a new Aurigma.GraphicsMill.Bitmap with a format of Format32bppRgb. We then Scale the image, and save it. When this happens the image comes out corrupted. Using a PixelFormat of 32bppRBGA or 24bppRGB works. Example code Code:using (Bitmap bm = Bitmap.FromFile("SomeFile.jpg") as Bitmap)
{
using (Aurigma.GraphicsMill.Bitmap aurigma = new Aurigma.GraphicsMill.Bitmap(bm.Width, bm.Height, Aurigma.GraphicsMill.PixelFormat.Format32bppRgb))
{
using (Graphics g = aurigma.GetGdiplusGraphics())
{
g.DrawImage(bm, new Rectangle(0, 0, bm.Width, bm.Height));
}
SizeF newSize = new SizeF(bm.Width*1.1f, bm.Height*1.1f);
aurigma.Transforms.Resize(newSize);
aurigma.Save("C:\\corrupt.jpg");
}
}
This isnt that breaking for us, as we can easily use the 32bit format with Alpha right now, but may need without alpha in the future. The format has to remain 32bit for interoping with a 3rd party control (hence the 32bit RGB as opposed to 24bit). I'll attach before and after pictures to illustrate the issue. thedo attached the following image(s):
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
|
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Scaling an image with PixelFormat of Rgb32 corupts image
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.