Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The rectangle in your example appears to be a frame representing the changed portion of the image sequence, starting from 1. Open the file in Gimp to see.</p> <p><img src="https://i.stack.imgur.com/LnVlG.png" alt="enter image description here"></p> <p>Addendum: It looks like a <a href="http://en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF" rel="nofollow noreferrer">feature</a> intended to optimize rendering. At a guess, I'd say you could rely on the bounds of image number <code>getMinIndex()</code>; later frames appear to be subsumed in the first.</p> <p>Addendum:</p> <blockquote> <p>is there a way to get the full pixel data with the normal image and changes?</p> </blockquote> <p>Assuming known geometry, you should be able to combine the first image and any later one in a <code>BufferedImage</code>, as shown <a href="https://stackoverflow.com/questions/2658663">here</a>.</p> <p>Code:</p> <pre><code>import java.awt.image.BufferedImage; import java.io.IOException; import java.net.URL; import javax.imageio.ImageIO; import javax.imageio.ImageReader; public class GifBounds { /** @see https://stackoverflow.com/questions/5688104 */ public static void main(String[] args) throws IOException { search(new URL("http://i55.tinypic.com/263veb9.gif")); } public static void search(URL url) throws IOException { try { ImageReader reader = ImageIO.getImageReadersBySuffix("gif").next(); reader.setInput(ImageIO.createImageInputStream(url.openStream())); int i = reader.getMinIndex(); while (true) { BufferedImage bi = reader.read(i++); System.out.println(i + ": " + bi.getWidth() + ", " + bi.getHeight()); } } catch (IndexOutOfBoundsException e) { // ignored } } } </code></pre> <p>Console:</p> <pre> 1: 200, 220 2: 79, 95 3: 77, 94 4: 78, 95 5: 79, 95 6: 77, 94 7: 78, 95 8: 79, 95 9: 77, 94 10: 180, 205 11: 97, 111 12: 173, 200 13: 174, 155 14: 174, 155 15: 174, 155 16: 174, 155 17: 174, 155 18: 174, 155 19: 174, 155 20: 167, 200 21: 97, 111 </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload