I would like to create a simple GIF, consisting of 2 images only:

  1. One full white circle (100px x 100px)
  2. One half-cirlce (100px x 50px)

The idea is, make it looks like the circle is folded into half from the original.

Now my question is, seems that the GIF software or service i use, only work IF both images are of 'equal size'.

I would like to position the second image (half-circle) at the bottom, as in the image below:

enter image description here

Is is possible? Currently I am using ScreenToGif software but there is no luck.

  • I think i knew the answer... All i need to do, is to add an additional transparency half-center to the second image to make it same size as the 1st. This has nothing to do with GIF software at all – zeroflaw Oct 8 '17 at 14:35
  • 1
    Exactly. You cannot have two different resolution frames in one gif as far as I know. – El Otmani Ali Oct 8 '17 at 16:36
  • @ElOtmaniAli Ya, when I tried more online services that really seems to be the case. :) Suddenly i found myself dumb asking this. hahaa – zeroflaw Oct 9 '17 at 2:07

That's perfectly possible with the GIF image file format. In fact, changing the frame size is one of the ways to optimize the file size of a given GIF file, usually by reducing subsequent frames to contain only the changed parts and combine these with the previous frame.

An application may choose to only allow frames of the same size, of course. For one, this simplifies the user interface because it doesn't need controls to allow the user to position any frames smaller than the resulting image.

For example, the following image is a GIF animation created with 11 full-sized frames, each of them 100x100 pixels. It has a file size of about 2.5 KB.

GIF animation example, unoptimized

When optimized to contain smaller frames - all of the white squares as 10x10 pixels instead of the 100x100 pixels of the previous image - then the file size goes down to 512 bytes. Your (billable) data transfer for this image has just been reduced by a factor of 5.

GIF animation example, optimized

The service you are using to create the images may be using such optimizations. To check this, load one of the resulting files into an image editor (for example GIMP) and check the frame sizes there.

| improve this answer | |
  • Thanks for your answer. Do you mind giving an example of the mainstream ways to create a GIF? (which allows 'reduce subsequent frames to contain on the changed parts...) – zeroflaw Oct 9 '17 at 12:02
  • Can you please show a sample GIF that has its size being changed over the frames? – android developer Aug 25 '18 at 5:12
  • @androiddeveloper you mean like the second GIF image in the answer? Not sure what exactly you are asking for if this doesn't answer your question. – Michael Schumacher Aug 27 '18 at 8:46
  • @MichaelSchumacher The second GIF has a size that's changing? The web browser doesn't show it. I see a red square with same size for all its frames. – android developer Aug 27 '18 at 9:15
  • Look at them in a suitably capable image editor. You will find that the white squares are in much smaller frames compared to the first image. – Michael Schumacher Aug 27 '18 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.