[SOLVED] text to image conversion

Status
Not open for further replies.

phobos1

Full Member level 2
Joined
Jan 18, 2010
Messages
135
Helped
15
Reputation
30
Reaction score
15
Trophy points
1,298
Location
Salem, Tamil Nadu, India
Visit site
Activity points
2,112
plz correct my error i'm using octave

%---------------------------------------------
%Description:
%---------------------------------------------
clear all;
clc;
pkg load image
R = 128;
C = 128;
filename = uigetfile();
fid = fopen (filename, "r");
TEMP = fscanf(fid, "%x",(R*C));
fclose(fid);
l = 0;
for u = 1:R
for v =1:C
QI(u,v) = TEMP(v+l);
end
l=l+R;
end
imshow(uint8(QI));


i have attached the input file
 

Attachments

  • dump.txt
    47.5 KB · Views: 72

actually i'm trying to reconstruct the image from the data provided in the dump.txt. the data in the file is written in the following fashion
R1
R2
R3
.
.
.
.
.
R128

its a 128X128 image can u help in this
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…