0

I have this image which with point curse it showsenter image description here

X ,Y index RGB

the index values are important for me and I want to save this image and use it later. but when I am using

imwrite(im, 'importantIm.png' , 'png')

the created image does not have index value. here is the resulting saved image (png format); enter image description here

I produce im , like below

im=zeros([1204 1204]);

with a loop add data to it.

user1331843
  • 123
  • 1
  • 6
  • 15
  • With indexed image you refer to the information which is displayed in the tooltip? It should be written to the file as well? How is it created, think you must save the figure, not the image. – Daniel Jul 05 '15 at 15:06
  • no, I just wanted to show that the "index" is important for me. not graphically save the view in the figure. When I am writing this image in png format, its index converted to 0-255. but i want to save the original index. – user1331843 Jul 05 '15 at 15:15
  • 1
    So it is not about the index but about the data type conversion from 0...1 scaled double values to uint8? What about 3 color channels vs 1 color channel, is that irrelevant? Is your original image in the 0...1 range? – Daniel Jul 05 '15 at 16:05
  • 1
    The value inside the index in my image, 38.61 is added by loop to the "im" and i want to have them in png file. but when I am oping my saved png , I have index is equal to 0 or 255. So I can say I do not want this conversion. I added the saved resulting image. – user1331843 Jul 05 '15 at 16:15
  • You can't save floating point data in an image unless it's normalized between `[0,1]`. If you want to save the values exactly, I suggest you simply save the data as a MAT file to be recalled later. Don't save them as images. – rayryeng Jul 05 '15 at 20:59

0 Answers0