I'm trying to add unit tests to the .Net ImageProcessor library: https://github.com/cosmo0/ImageProcessor/tree/tests
I'm working on Xamarin/Mono on my Mac. Mono seems to have a few problems with animated gifs images.
For my unit tests, I have a bunch of test images, and I load them all and run transformations on each of them. Each time I apply a filter (brightness for instance), it fails when trying to re-create an image.
The failing line is here : https://github.com/cosmo0/ImageProcessor/blob/tests/src/ImageProcessor/Imaging/Formats/GifFormat.cs#L95
It's just an Image.FromStream(stream);
. I'm guessing the stream is wrong ; I tried to save it to a file, and indeed the file is not readable by the image viewer. The weird thing is that on Windows, it seems to be passing the tests perfectly fine: https://ci.appveyor.com/project/cosmo0/imageprocessor
Any idea what I could do to check the stream or fix it ?
Thanks !
The Threshold Alpha command converts semi-transparent areas of the active layer into completely transparent or completely opaque areas, based on a threshold you set, between 0 and 255. It only works on layers of RGB images which have an alpha channel.
To remove text from JPEG/JPG/GIF/PNG/BMP images, you can use the iMyFone MarkGo tool. Just install the software and click on the 'Remove Watermark' option to upload the file and to erase the unwanted text.
Try to reset the stream before calling
Image.FromStream(stream)
like this :
stream.Seek(0, SeekOrigin.Begin);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With