.net - Rotate TIFF Image VB.NET Console Application -
i have console application performs ocr on large tiff image (about 6mb image) before perform ocr need rotate image.
i imported system.drawing namespace , rotation code follows:
dim bmp system.drawing.bitmap bmp = new system.drawing.bitmap(filename) bmp.rotateflip(rotatefliptype.rotate270flipnone) bmp.save(filename, system.drawing.imaging.imageformat.tiff)
sometimes works, gives me parameter not valid error. strange thing is, using same exact test image every time, different file names. did check filename being passed valid....
sometimes gives me parameter not valid error
part of problem that, save method throw exception if save image same file created from
http://msdn.microsoft.com/en-us/library/vstudio/9t4syfhh%28v=vs.100%29.aspx
you rename file or delete original first.
Comments
Post a Comment