imagemagick - How to make image background transparent? -


i have 2 images:

first

http://www.eurocopter.in/contest/images/loader33.gif

second

if see first image has no background. background looks white. second image has black background.

  • question 1 : call first type of picture?

  • question 2 : how make type of picture?

  • question 3 : how transform second type of picture first type of picture?

they animated gifs, first transparent background. can separate image individual frames imagemagick (installed on linux distros , available free osx , linux) this:

convert -coalesce type1.gif frame%02d.gif 

which give following 18 frames individual images

frame00.gif frame04.gif frame08.gif frame12.gif frame16.gif frame01.gif frame05.gif frame09.gif frame13.gif frame17.gif frame02.gif frame06.gif frame10.gif frame14.gif frame03.gif frame07.gif frame11.gif frame15.gif 

frame00.gif

enter image description here

you can see them @ once if make them montage this:

convert -coalesce type1.gif miff:- | montage -tile x4 -frame 5 - montage.gif 

enter image description here

you can find information each frame, such size this:

identify type1.gif  type1.gif[0] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[1] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[2] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[3] gif 100x100 100x100+0+0 8-bit srgb 64c 29.2kb 0.000u 0:00.000 type1.gif[4] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[5] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[6] gif 100x100 100x100+0+0 8-bit srgb 64c 29.2kb 0.000u 0:00.000 type1.gif[7] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[8] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[9] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[10] gif 100x100 100x100+0+0 8-bit srgb 64c 29.2kb 0.000u 0:00.000 type1.gif[11] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[12] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[13] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[14] gif 100x100 100x100+0+0 8-bit srgb 64c 29.2kb 0.000u 0:00.000 type1.gif[15] gif 100x100 100x100+0+0 8-bit srgb 64c 29.2kb 0.000u 0:00.000 type1.gif[16] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 type1.gif[17] gif 100x100 100x100+0+0 8-bit srgb 128c 29.2kb 0.000u 0:00.000 

you can put frames this:

convert frame* -loop 0 -delay 20 anim.gif 

enter image description here

you can try , remove black background second 1 make more first one, using command this. may need fiddle fuzz factor bit:

convert type2.gif -fuzz 15% -transparent black new.gif 

enter image description here


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -