We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

RotateFlipType FlipY causing error

using the following code block, if the types of
The following error is received:
Parameter is not valid.

Any advice would be appreciated.

		using (MemoryStream ms = new MemoryStream(imgArray))
			using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(ms))
				using (MemoryStream outStream = new MemoryStream())
					Aspose.Imaging.RotateFlipType rotate = (Aspose.Imaging.RotateFlipType)Enum.Parse(typeof(Aspose.Imaging.RotateFlipType), strRotation);
					base64 = Convert.ToBase64String(outStream.ToArray());

Hi Art,

Thank you for contacting Aspose support.

You must be using an older version of the API because the mentioned problem has been fixed with recent releases of Aspose.Imaging for .NET API. We would request you to please give a try to the latest version of Aspose.Imaging for .NET 2.4.0 on your end. Hopefully, you will not face the issue again. In case the problem persists, please provide us an executable sample application along with your input image for thorough investigation.

I have downloaded the latest version as recommended. removed all references the previous files. Executed Clean then Build. I still have the same issue with version 2.4.0 with file date of 5/8/2014.

attached basic project. Using Ext.Net

Any other idea’s?


Hi Art,

Thank you for providing your sample application.

We have checked your provided project and have experienced ArgumentOutOfRangeException on the following statement.


string imgConvert = strImage.Substring(strImage.IndexOf(“base64,”) + 7);

Reason being, variable strImage is empty, whereas code is trying to extract a sub-string from it. Anyway, the said exception has nothing to do with Aspose.Imaging for .NET API, and it seems to be a flaw in your custom logic. In order to further evaluate the presented problem, we amended your application to load a test image from disk and performed rotation (FlipY) on it. We were unable to notice any problem while using the latest version of Aspose.Imaging for .NET 2.4.0.

Please also check the attached project in an archive, that iterates over all the possible values of RotateFlipType enumeration and perform several rotations on an image.

Hope this helps.

Thanks Babar,

I have removed the custom logic.

1. loading image from disk

2. fixed the rotation type from RotationType

I included a copy of the error message.

Still the same.

Thank you for your assistance


Hi Art,

Thank you for providing the simple application.

We are able to observe the problem of RotateFlip method while performing FlipY type rotations on PNG images. The problem is reproducible with Aspose.Imaging for .NET 2.4.0, however, we have recently published v2.5.0 of the API that has fixed this problem. Please download the latest version of Aspose.Imaging for .NET 2.5.0 and give it a try on your end.

Thank you. that resolved the issue.


Good to know that you are up and running again. Please feel free to write back in case you face any difficulty.