help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imwrite 16-bit


From: gregj
Subject: imwrite 16-bit
Date: Fri, 22 Mar 2013 10:00:04 -0700 (PDT)

I am relatively new to Octave, and have a question regarding imwrite()
functionality.

When trying to create a 16-bit .png file using imwrite, the following code
works:

img=zeros(480,752,"uint16");
r=500;

for y=1:480
   for x=1:752
        img(y,x)=uint16(x);
   endfor
endfor

imwrite(img,"test.png");                

and this doesn't:

img=zeros(480,752,"uint16");
r=500;

for y=1:480
   for x=1:752
        img(y,x)=r;
   endfor
endfor

imwrite(img,"test.png");                


I am simply trying to fill a 16-bit png with a constant value. I seem to be
missing something; any help would be greatly appreciated.

thanks!




--
View this message in context: 
http://octave.1599824.n4.nabble.com/imwrite-16-bit-tp4651120.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]