int iTransparency=-1;
GIFStreamMetadata smd=(GIFStreamMetadata) reader.getStreamMetadata();
//Analyze, which mode will be used
GIFImageMetadata md;
for(int i=0;i<numImages;i++){
md=(GIFImageMetadata) reader.getImageMetadata(i);
if(md.transparentColorFlag){
iTransparency=md.transparentColorIndex;
hasTransparecy=true;