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
bdavi19  
#1 Posted : Thursday, March 23, 2006 2:52:36 AM(UTC)
bdavi19

Rank: Member

Groups: Guest
Joined: 3/23/2006(UTC)
Posts: 14

I would like to be able to rotate a jpeg and write it back to the same file. My code looks something like this:

Code:
Aurigma.GraphicsMill.Codecs.LosslessJpegTransform trans = new Aurigma.GraphicsMill.Codecs.LosslessJpegTransform();

trans.Open(item.Pidl.Path);
trans.WriteRotated(item.Pidl.Path, System.Drawing.RotateFlipType.Rotate90FlipNone);
trans.Close();

When I get to the WriteRotated command, an error is thrown because the file is being used by another process (trans.Open). I'm sure I can figure out a work around, but I just wanted to make sure I wasn't missing a step.

Thanks,

Brad

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

Dmitry  
#2 Posted : Thursday, March 23, 2006 12:43:09 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 Brad,

Unfortunately you cannot load and save an image from/into the same file. In your case you should save your result image into temporary file and then rename it to file name which you need.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

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.