Downloaded these as a1.png to a4.png
NOTE: you should specify a delay! even if browsers do what you want.
Avoiding the GIF format handling for the time being....
Code: Select all
convert a?.png -delay 10 -layers OptimizeTransparency miff: | animate -
and the animation comes out perfectly.
Checking the optimized frames
Code: Select all
convert a?.png -delay 10 -layers OptimizeTransparency miff: | gif_anim_montage 2x -
Looking at 'gif' version...
Code: Select all
convert a?.png -delay 10 -layers OptimizeTransparency gif: | gif_anim_montage 2x -
and I can see differences in the parts you are complaining about.
Extracting the first frame (which is the only place which could have transparent pixels in the center region)
Code: Select all
convert a?.png -delay 10 -layers OptimizeTransparency gif: | \
convert '-[0]' -alpha extract show:
shows a black dot everywhere their is a transparency issue.
going back to MIFF output..
Code: Select all
convert a?.png -delay 10 -layers OptimizeTransparency miff: | \
convert '-[0]' -alpha extract show:
and the dots disappear.
Looking at the actual pixel data and I find the first image is actually semi-transparent in places.
The
-layers OptimizeTransparency does not modify the first frame. only the second and later frames based on differences. As such these semi-transparent pixels must be in the source image. and they are. In image a1.png. Actually they are in ALL your images, and the center region are matched as being equivalent!
Your input images are NOT fully opaque.
That is the cause of your problems.
Indeed
...
alpha:
min: 11822 (0.180392)
max: 65535 (1)
mean: 65301.5 (0.996437)
standard deviation: 2731.65 (0.0416823)
kurtosis: 133.565
skewness: 11.6296
...
Alpha should have been fully opaque.
Code: Select all
convert a1.png -alpha extract -verbose info:
...
Histogram:
4: (11822,11822,11822) #2E2E2E2E2E2E grey18
2192: (33410,33410,33410) #828282828282 grey51
300304: (65535,65535,65535) #FFFFFFFFFFFF white
...
You have at more than 2000 semi-transparent pixels in your first image!
This is why +matte is needed -- to make all pixels full opaque first!
So either use
+matte, for this specific animation. or fix the method used to create the frames.