![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | JPEG rotation without recompress Hello, is there a way to force the WIC jpeg decoder / encoder to do 90 degree rotations without recompressing the image ? Thanks, Dirk |
My System Specs![]() |
| | #2 (permalink) |
| | re: JPEG rotation without recompress Are you using managed or unmanaged code? The short answer is yes, if you use the JpegBitmapEncoder with the rotate property or in unmanaged code, if you specify the rotation encoder property (using IPropertyBag2). When you specify a rotation for JPEG encoding using this method, we do a lossless rotation if the JPEG can be losslessly rotated. Robert. -----Original Message----- From: Dirk Posted At: Tuesday, July 11, 2006 3:44 AM Posted To: microsoft.public.windows.developer.winfx.avalon Conversation: JPEG rotation without recompress Subject: JPEG rotation without recompress Hello, is there a way to force the WIC jpeg decoder / encoder to do 90 degree rotations without recompressing the image ? Thanks, Dirk |
My System Specs![]() |
| | #3 (permalink) |
| | re: JPEG rotation without recompress Thanks for the response. I´m using managed code like this: public static void RotateJPEG(string path, Rotation rotation) { try { FileStream stream = new FileStream(System.IO.Path.GetDirectoryName(path) + @"\new.jpg", FileMode.Create); JpegBitmapEncoder encoder = new JpegBitmapEncoder(); encoder.Rotation = rotation; encoder.Frames.Add(BitmapFrame.Create(new Uri(path))); encoder.Save(stream); stream.Dispose(); } catch (Exception e) { } } This code itself works, but a remaining question is, how the QualityLevel property influences the result: Only used if lossless rotation possible otherwise ignored ? Another point related to image rotation: Maybe there is a bug in BitmapFrame.Thumbnail function ? For digital camera jpegs shoot in portrait orientation thumbnail function returns an image in landscape orientation which contains thumbnail in portrait orientation with black borders on left and right. "robertwl@nospam.microsoft.com" wrote: > Are you using managed or unmanaged code? The short answer is yes, if you use the JpegBitmapEncoder with the rotate property or in unmanaged code, if you specify the rotation encoder property (using IPropertyBag2). > > When you specify a rotation for JPEG encoding using this method, we do a lossless rotation if the JPEG can be losslessly rotated. > > Robert. > > -----Original Message----- > From: Dirk > Posted At: Tuesday, July 11, 2006 3:44 AM > Posted To: microsoft.public.windows.developer.winfx.avalon > Conversation: JPEG rotation without recompress > Subject: JPEG rotation without recompress > > > Hello, > > is there a way to force the WIC jpeg decoder / encoder to do 90 degree > rotations without recompressing the image ? > > Thanks, > Dirk > |
My System Specs![]() |
| | #4 (permalink) |
| | re: JPEG rotation without recompress Good question! You're best bet to preserve quality is to do this: public static void RotateJPEG(string path, Rotation rotation) { try { using (FileStream stream = new FileStream(System.IO.Path.GetDirectoryName(path) + @"\new.jpg", FileMode.Create)} { BitmapDecoder decoder = BitmapDecoder.Create(new Uri(path), BitmapCreateOptions.PreservePixelFormat | BitmapCreateOptions.IgnoreColorProfile, BitmapCacheOption.None); JpegBitmapEncoder encoder = new JpegBitmapEncoder(); encoder.Rotation = rotation; encoder.Frames = decoder.Frames; encoder.Save(stream); stream.Flush(); } catch (Exception e) { } } -----Original Message----- From: Dirk Posted At: Tuesday, July 11, 2006 11:43 AM Posted To: microsoft.public.windows.developer.winfx.avalon Conversation: JPEG rotation without recompress Subject: re: JPEG rotation without recompress Thanks for the response. I´m using managed code like this: public static void RotateJPEG(string path, Rotation rotation) { try { FileStream stream = new FileStream(System.IO.Path.GetDirectoryName(path) + @"\new.jpg", FileMode.Create); JpegBitmapEncoder encoder = new JpegBitmapEncoder(); encoder.Rotation = rotation; encoder.Frames.Add(BitmapFrame.Create(new Uri(path))); encoder.Save(stream); stream.Dispose(); } catch (Exception e) { } } This code itself works, but a remaining question is, how the QualityLevel property influences the result: Only used if lossless rotation possible otherwise ignored ? Another point related to image rotation: Maybe there is a bug in BitmapFrame.Thumbnail function ? For digital camera jpegs shoot in portrait orientation thumbnail function returns an image in landscape orientation which contains thumbnail in portrait orientation with black borders on left and right. "robertwl@nospam.microsoft.com" wrote: > Are you using managed or unmanaged code? The short answer is yes, if you use the JpegBitmapEncoder with the rotate property or in unmanaged code, if you specify the rotation encoder property (using IPropertyBag2). > > When you specify a rotation for JPEG encoding using this method, we do a lossless rotation if the JPEG can be losslessly rotated. > > Robert. > > -----Original Message----- > From: Dirk > Posted At: Tuesday, July 11, 2006 3:44 AM > Posted To: microsoft.public.windows.developer.winfx.avalon > Conversation: JPEG rotation without recompress > Subject: JPEG rotation without recompress > > > Hello, > > is there a way to force the WIC jpeg decoder / encoder to do 90 degree > rotations without recompressing the image ? > > Thanks, > Dirk > |
My System Specs![]() |
| | #5 (permalink) |
| | re: JPEG rotation without recompress This works and I´m using the code now to rotate JPEG image and overwrite the original file, which results in a bug for two 90 degree rotates: First one is ok -> 90° second one -> shows 0° ( original image instead of 180° ) third one again is ok -> 270° Another point for the documentation: it would be helpful, to know which of the components of the WIC are locking the image file, how to force them to close the file or for constructors with stream, who is closing / allowed to close the stream. "robertwl@nospam.microsoft.com" wrote: > Good question! You're best bet to preserve quality is to do this: > > public static void RotateJPEG(string path, Rotation rotation) > { > try > { > using (FileStream stream = new > FileStream(System.IO.Path.GetDirectoryName(path) + @"\new.jpg", FileMode.Create)} > { > BitmapDecoder decoder = BitmapDecoder.Create(new Uri(path), BitmapCreateOptions.PreservePixelFormat | BitmapCreateOptions.IgnoreColorProfile, BitmapCacheOption.None); > > JpegBitmapEncoder encoder = new JpegBitmapEncoder(); > > encoder.Rotation = rotation; > encoder.Frames = decoder.Frames; > encoder.Save(stream); > stream.Flush(); > } > catch (Exception e) > { > } > } > > -----Original Message----- > From: Dirk > Posted At: Tuesday, July 11, 2006 11:43 AM > Posted To: microsoft.public.windows.developer.winfx.avalon > Conversation: JPEG rotation without recompress > Subject: re: JPEG rotation without recompress > > > Thanks for the response. I´m using managed code like this: > > public static void RotateJPEG(string path, Rotation rotation) > { > try > { > FileStream stream = new > FileStream(System.IO.Path.GetDirectoryName(path) + @"\new.jpg", > FileMode.Create); > JpegBitmapEncoder encoder = new JpegBitmapEncoder(); > > encoder.Rotation = rotation; > encoder.Frames.Add(BitmapFrame.Create(new Uri(path))); > encoder.Save(stream); > stream.Dispose(); > } > catch (Exception e) > { > } > } > > This code itself works, but a remaining question is, how the QualityLevel > property influences the result: Only used if lossless rotation possible > otherwise ignored ? > > Another point related to image rotation: > Maybe there is a bug in BitmapFrame.Thumbnail function ? For digital camera > jpegs shoot in portrait orientation thumbnail function returns an image in > landscape orientation which contains thumbnail in portrait orientation with > black borders on left and right. > > "robertwl@nospam.microsoft.com" wrote: > > > Are you using managed or unmanaged code? The short answer is yes, if you use the JpegBitmapEncoder with the rotate property or in unmanaged code, if you specify the rotation encoder property (using IPropertyBag2). > > > > When you specify a rotation for JPEG encoding using this method, we do a lossless rotation if the JPEG can be losslessly rotated. > > > > Robert. > > > > -----Original Message----- > > From: Dirk > > Posted At: Tuesday, July 11, 2006 3:44 AM > > Posted To: microsoft.public.windows.developer.winfx.avalon > > Conversation: JPEG rotation without recompress > > Subject: JPEG rotation without recompress > > > > > > Hello, > > > > is there a way to force the WIC jpeg decoder / encoder to do 90 degree > > rotations without recompressing the image ? > > > > Thanks, > > Dirk > > > |
My System Specs![]() |
| | #6 (permalink) |
| | re: JPEG rotation without recompress V\0e\0r\0y\0 \0i\0n\0t\0e\0r\0e\0s\0t\0i\0n\0g\0.\0 \0T\0h\0a\0n\0k\0s\0 \0f\0o\0r\0 \0r\0e\0p\0o\0r\0t\0i\0n\0g\0 \0t\0h\0a\0t\0.\0 \0I\0'\0l\0l\0 \0i\0n\0v\0e\0s\0t\0i\0g\0a\0t\0e\0 \0f\0u\0r\0t\0h\0e\0r\0. A\0s\0 \0f\0a\0r\0 \0a\0s\0 \0f\0i\0l\0e\0 \0l\0o\0c\0k\0i\0n\0g\0 \0g\0o\0e\0s\0.\0.\0.\0 \0I\0f\0 \0y\0o\0u\0 \0u\0s\0e\0 \0B\0i\0t\0m\0a\0p\0C\0a\0c\0h\0e\0O\0p\0t\0i\0o\0n\0.\0O\0n\0L\0o\0a\0d\0,\0 \0t\0h\0e\0 \0i\0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0o\0, >\0 \0> >\0 \0>\0 \0i\0s\0 \0t\0h\0e\0r\0e\0 \0a\0 \0w\0a\0y\0 \0t\0o\0 \0f\0o\0r\0c\0e\0 \0t\0h\0e\0 \0W\0I\0C\0 \0j\0p\0e\0g\0 \0d\0e\0c\0o\0d\0e\0r\0 \0/\0 \0e\0n\0c\0o\0d\0e\0r\0 \0t\0o\0 \0d\0o\0 \09\00\0 \0d\0e\0g\0r\0e\0e >\0 \0>\0 \0r\0o\0t\0a\0t\0i\0o\0n\0s\0 \0w\0i\0t\0h\0o\0u\0t\0 \0r\0e\0c\0o\0m\0p\0r\0e\0s\0s\0i\0n\0g\0 \0t\0h\0e\0 \0i\0m\0a\0g\0e\0 \0? >\0 \0> >\0 \0>\0 \0T\0h\0a\0n\0k\0s\0, >\0 \0>\0 \0D\0i\0r\0k >\0 \0> > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: JPEG rotation without recompress robertwl@nospam.microsoft.com wrote: > V\0e\0r\0y\0 \0i\0n\0t\0e\0r\0e\0s\0t\0i\0n\0g\0. Your body text is in UTF-16, but the header on your post says UTF-8: | Content-Transfer-Encoding: UTF-8 | Content-Type: text/plain;charset="Utf-8" -- Barry -- http://barrkel.blogspot.com/ |
My System Specs![]() |
| | #8 (permalink) |
| | re: JPEG rotation without recompress Not sure why this happened... What the replied had was something along these lines: Thanks for reporting the issue with the save. I'll try to repro on my end. As for the file locking issue goes... If you use BitmapCacheOption.OnLoad, the file will be locked for a short period of time while the iamge is being decoded. But the lock is released fairly quickly. For other BitmapCacheOptions, the file will be locked until the application is shutdown: 1. OnDemand or Default: The cache will be created only when the image is rendered or CopyPixels is called. 2. None: No cache will be created. Each time the image is rendered or CopyPixels is called, the image will be re-decoded. -----Original Message----- From: robertwl@nospam.microsoft.com Posted At: Thursday, July 13, 2006 1:33 PM Posted To: microsoft.public.windows.developer.winfx.avalon Conversation: JPEG rotation without recompress Subject: re: JPEG rotation without recompress V |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| rotation distortion | Vista music pictures video | |||
| Picture rotation problems | Vista music pictures video | |||
| Automatic photo rotation? | Vista music pictures video | |||
| screen rotation | Vista General | |||