I am working on Parallelization of Fractal Image Compression. I have used prof. Yuval Fisher's enc.c and dec.c fractal image compressor / decompressor. The code is working fine but my question is:

How to view the RAW images lenna.dat(input image) and lenna.out(decoded image) on Windows/Sun/LINUX machine. I think there are no headers therefore image is not viewable in traditional viewers.

9 Years
Discussion Span
Last Post by Arun_8

You should google more. This link has this explaination.


The file Images/r2s.c will create sunraster header. It can be prepended
to the raw data files to convert them to sunraster format. To use
r2s.c, compile it (cc -o r2s.c r2s), and then type
r2s 256 256 > head
cat head imagefile.raw > imagefile.ras
which will create a head file for a 256x256 sunraster file and prepend
it to the raw image file....

So find the Images/r2s.c file and compile it. If you can't find it in the internet, try emailing Fisher (if he can be contacted by email), and ask for the source file.


Hi Sajoo, I am looking for parallelizing Fracta Compression on GPUs. Can you please indicate how you went about implementing parallel algorithm for the serial code. I am also facing difficulty in viewing the raw image as I am unable to find r2s.c filr so far. Please reply.



I am working on Parallelization of Fractal Image Compression. I am using prof. Yuval Fisher's enc.c and dec.c fractal image compression C code. The code is not working properly. it is showing "No memory in matrix allocate" fatal output. If the code of anyone of you is working properly then help me for implementation or plz send me the your running .c file... Thank You..

Edited by pritaeas: Removed email. Keep it on-site. Next time start a new discussion thread, instead of replying to an unrelated one.


Hi Arun,
I have been using enc.c on Linux environment and never found any error in the compilation or running. You need to run enc.c as follows:

gcc -lm enc.c
./a.out lena.raw

Once you get a.out you need to pass any raw file as an argument to a.out. I have passed lena.raw in my case. There are many other options. I have outlined the bare minimum.
Hope that helps.


hello munesh sir,
I have applied your given steps but its again showing error.
My code is still not executing properly. Give me your mail ID i'll send you my code file with the Lenna.dat file. Please check my code by running it. Thank you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.