How to convert List<Uint8List> to an animated GIF?
my List<Uint8List> consists of images and I need to merge them and make them as GIF.
I've tried this but it does not animate:
Is their any way to convert .jpeg images to .gif in flutter?
The link you provided should work. If not, please give a reproducible sample. For example, provide your sample List<Uint8List>. In addition, what error messages do you see?
Without further information, I guess your Uint8List is not of the correct format. If you upload one example Uint8List (you know, just some bytes), I can have a look.
By the way, I suggest to have some basic understanding of image formats. For example, what is a "bitmap" (pixels are arranged byte by byte), and what is a encoded format like jpeg/png/gif/etc.
I think the best thing is that you develop the gif in any program for this and then load it with your app from the assets, if you need help tell me and I can help you better by sending me the images to make the gif
Related
When i take a picture from the CameraController in camera package, and i take the same picture with the same image but with image_picker, and i encode every picture to base64 code, both codes are completely different. 3/4 (800) of their characteres are different. But, when i take two different pictures to the same object with just image_picker, and i compare the base64 codes of erveyone, they are almost the same, just with 6-7 different characteres. I tested visually showing the image files generated by image_picture and camera and they are basically the same.
That's a problem to me, because tesseract package recognize the images from image_picker, but not the images from camera, so, i need to know what is the root of the problem and if that have any solution.
I'm using Swift in iOS and used the code based on this SO post to save a UIImage as a bmp
Convert UIImage to NSData and convert back to UIImage in Swift?
The data I create and save is recognized as a bmp in Photoshop and Preview but can’t be read by the Adafruit PyPortal. The only diff I can find is that when I resave the bmp in Photoshop as a bmp again, it shows as “Flip row order” selected in the BMP options screen that appears right after the main save screen.
If I uncheck this option and save the file, the PyPortal can then read this resaved file. This post above was great for getting the UIImage into .bmp format, but I need to get this additional file change done programmatically on iOS, so opening in a third-party product, or working with shell commands won't work as a solution. I’ve not been able to find anything in Apple’s docs that looks like it corresponds to Flip row order and there isn’t much online about this option within Photoshop so it’s unclear even what this does.
For the curious I have samples of the bmp my app creates as well as options resaved or run through an online converter (both these options work on PyPortal).
https://drive.google.com/drive/folders/1DQYes-cJXKm3ue8Z9cACDLEN5bxnnkJc
Any suggestions are appreciated. Thx!
The “Flip row order” option tells the bmp reader software to read the first row of pixels first and the last row of pixels last. This is not the “normal” way most bmp reader interpret a bmp format image. Most implementations read from the last row first and then work its way up to the first row of pixels.
Your options are either, rewrite the bitmap creating software so that it matches the abilities of the bmp reader software or change the bmp reader software so it can read the bmp file.
I’m fully aware this doesn’t solve the issue but can help understanding what it going wrong and guide you in the right direction.
I am able to read JPEG format image and can write JPEG format image. I want to do same for PNG format image but i am not getting how to do that.
It's the same concept as jpeg. One of the "magicks" of the library is that it is largely type independent when writing the code. Try doing it the same way.
If you're attempting to do conversion, maybe try looking here.
I am doing something like extracting the pdf text in a string format so as to annotate the text and in the same process i need to find the image positions covered in the same pdf file so as to maintain its position. Now the problem is that i am not getting the exact positions of the images in the same pdf file. Is it possible to use some thing like OCR,if yes,how to use that?
Can anybody help me in finding the exact position of the image in the pdf file? I need to implement some pdf reader kind of application for ipad,that's just for the knowledge.
Thank you.
Isn't OCR a little bit heavy weight for iphone?
Take look on tools like pdftotext from Xpdf. It is much simpler to read data, as to render and recognize it back again.
I'm trying to convert a series of JPEG images into a simple uncompressed AVI movie. Does anyone have any suggestions for how to do this?
Take a look at the ported ffmpeg-version you can use on the iPhone, they provide exactly what you need :)!
This might help:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/QTKitApplicationTutorial/CreatingaQTKitStoporStillMotionApplication/CreatingaQTKitStoporStillMotionApplication.html
If you must convert it to an avi file Petteri Hietavirta's answer might really help. But if you just want to show the video with those images in your app, you might as well use a timer with a very small interval and animate all the images. It looks as smooth as a video.
P.S. - UIImageView provides inbuilt animation but it requires creating an array of all the images, which is not recommended for a large number of images, as it eats up lot of memory.