0

I have a binary classification file shows urban areas. I need to convert this file to 8 bit unsigned integer GIF format.

ENVI can't save images as GIF so I've used IDL and write a few lines to change the image format to GIF.

pro envi2gif
e = ENVI()
File = FILEPATH('1990_urban.tif',Root_Dir='C:\Users\urban_comparison\7tiffs')
image = READ_IMAGE (File)
filename = FILEPATH('1990_urban.gif',Root_Dir='C:\Users\urban_comparison\\final_')
WRITE_GIF, filename, bytscl(image)
end

first image

second image

How can I avoid this rotation ?

1

You're right Luke;

pro envi2gif
e = ENVI()
File = FILEPATH('1990_urban.tif', Root_Dir='C:\Users\7tiffs')
image = READ_IMAGE (File)
image = REVERSE(image, 2)
filename = FILEPATH('1990_urban.gif', Root_Dir='C:\Users\30M')
WRITE_GIF, filename, bytscl(image)
end

This code is working properly !

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.