All entries for Thursday 02 November 2006
November 02, 2006
Loading times
If anyone has tried the code that I emailed out to to group a few days ago with the images that were attached they will have found that the program takes probably about 30 seconds to process a single picture. Initially I thought this purely because I didn’t program the code to be efficient. However, after Chris’ comment on using other images I tried it out on some other images and it seems that the program will process pictures of a similar resolution and even higher quality in well under a second.
It looks like the source of the problem is with the way Photoshop encoded the pictures when I resized them. For this reason I suggest that everyone open up the pictures in MS Paint and save them as a bitmap.
How to compile with CImg.h
OK
The compiler that I have been using comes with bloodshed Dev C++
Dev C++ can be downloaded from
Here Dev C++
Install Dev C++ then ignore the IDE that comes with it just use the compilers that it installs in C:\Dev-C++\Bin
And CImg.h can be downloaded from (Tweaked by me to work on Windows)
Here CImg.h
Extract the CImg.zip files and place them in C:\Dev-C++\Bin
This is because unfortunatly I have not been able to find a way of compiling any of the examples without them being in the bin, even with the bin folder being in the enviroment variables.
To compile the tutorial example load CMD
cd C:\Dev-C++\Bin
g++ -o tutorial.exe tutorial.cpp -O2 -lgdi32
This will take about 40sec to compile but does make quite a cool program,
Give it a go let me know if you get stuck, this should allow you to then start playing around with CImg and see if we can use it for out project!
Anthony