gif

Resizing animated GIF loses transparency and animation

不羁岁月 提交于 2020-01-16 00:33:08
问题 I am using the ImageResizer .NET component on an IIS hosted .NET web-service to handle resizing images that are stored in Amazon S3. It works great for everything except animated GIFs (so no problem with JPEG, PNG, standard GIF) With an animated GIF however the animation is lost and the transparency switches to black. Doesn't seem to make any difference whether I add an explicit format=gif parameter to the query string. The output from the resizer.debug page are shown below: Image resizer

Resize image in Java without losing transparency

僤鯓⒐⒋嵵緔 提交于 2020-01-14 16:47:12
问题 I want to resize an image (jpg, png, gif) without losing the transparency. I want to save the resized version to the disk after resizing. I googled a lot but I only found solutions that lose the transparency and fill the transparent space black... I am looking for a snippet or a library that does the job :) 回答1: This is how i solved my problem: public static BufferedImage convertRGBAToIndexed(BufferedImage src) { BufferedImage dest = new BufferedImage(src.getWidth(), src.getHeight(),

How can I improve loading times on a static HTML site?

≡放荡痞女 提交于 2020-01-14 09:38:09
问题 We are working on a website and noticed that the GIF images(100kb - 200kb) are loading very slowly. The site is a static site with CSS/HTML. Does any one have any pointers to why the images might be loading slowly? Would using JPGs improve the performance? Here is the HTML code for that image: <div><img src="images/mainImg_3.gif"> 回答1: They're loading slow because they're huge. 200KB is a very big image file. I don't know exactly what the going recommendation is for web images, but it's a

How can I improve loading times on a static HTML site?

两盒软妹~` 提交于 2020-01-14 09:38:08
问题 We are working on a website and noticed that the GIF images(100kb - 200kb) are loading very slowly. The site is a static site with CSS/HTML. Does any one have any pointers to why the images might be loading slowly? Would using JPGs improve the performance? Here is the HTML code for that image: <div><img src="images/mainImg_3.gif"> 回答1: They're loading slow because they're huge. 200KB is a very big image file. I don't know exactly what the going recommendation is for web images, but it's a

C# Drawing.Imaging dropping GIF frames if they are identical

隐身守侯 提交于 2020-01-14 05:54:25
问题 I need to load GIF animations and convert them frame by frame to bitmaps. To do that, I am extracting my GIF file frame by frame using Drawing.Imaging library and then casting each frame to bitmap. Everything works just fine except the times when the consecutive frames are the same, when there is no pixel difference. The library seems to be dropping such frames. I came to that conslusion with a simple test. I have created an animation of a circle that is growing and shrinking with a pause

How to convert PNG to GIF using javascript or other client-side tech?

天涯浪子 提交于 2020-01-14 02:34:13
问题 I have a combination of client-side technologies creating PNG data in the browser. Is there a way to convert the PNG data to GIF for display in IE without sending the data to the server? Wondering if there is an existing JavaScript library that will parse the PNG data and output GIF, or even JPEG. I know that I can send the PNG data to a server and have PHP / Python / or whatever generate a file for display in IE, but I'm aiming to keep this all on the client side even if the processing of

how can you record your screen in a gif? [closed]

感情迁移 提交于 2020-01-12 03:27:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . This is the example i am talking about, how can you do this? 回答1: I usually, on Mac, do this task with https://www.cockos.com/licecap/ (source: https://github.com/justinfrankel/licecap). It also runs on Windows. LICEcap can capture an area of your desktop and save it directly to .GIF (for viewing in web browsers

How to extract frames from a GIF file preserving frame dimensions

∥☆過路亽.° 提交于 2020-01-11 15:04:41
问题 I have the following GIF image file: I want to extract its frames (using PGM output format) using this imagemagick command: convert brocoli.gif out%05d.pgm But each frame has a different size. How can I extract its frames while preserving the original gif file size? 回答1: Use the -coalesce option: convert -coalesce brocoli.gif out%05d.pgm 来源: https://stackoverflow.com/questions/12791505/how-to-extract-frames-from-a-gif-file-preserving-frame-dimensions

Error saving gif video with R animation library and Imagemagick

烂漫一生 提交于 2020-01-11 08:56:16
问题 I am trying to create a simple .gif video using Windows 7. I installed ImageMagick and it seems to be working by itself. Here is the following code I tried to run and the corresponding error message. When I run the code the ImageMagik program opens up and it looks like the data for the first run is plotted (see image below). I suspect the problem is differences between windows and Unix commands? Perhaps I need to add more to the ani.options? Any help or suggestions would be greatly

Black background on GIF instead of transparency in PHP using imagegif()

风流意气都作罢 提交于 2020-01-11 06:26:06
问题 Edit 2: SUCCESS! many thanks to moycakes! The correct way to convert a PNG to a GIF while retaining transparency goes as follows: $input = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAAEYCAYAAABfgk2GAAAemklEQVR4Xu2dzYsm13WHe7rHxGATtw1Zu8UMY0wIkv6AoF44ZOEspFWyUytkkRASJG0sgS2NPkCKF5qxMSSboNbOu4xJcAxZaJRNlhqRVYaZpPUPSC2wiYmm38k5rS75delW1b1V9+Pcuk9BMR/vrXvPfc6p33veU7eqLu2wQQACEIBAEwQuNTFLJgkBCEAAAjsIPkEAAQhAoBECCH4jjmaaEIAABBB8YgACEIBAIwQQ