Saving surfaces to disk

Hi, i know this subject has been covered alot before, but i have to ask
because i am lazy and confused, i have set myself the joyous task of
converting about 10000 csv files to a html and bitmap combo, the csv files in
question are all major bus services in great britain, some of you may have
heard of the great britain bus timetable, now evolved to
http://www.internet.xephos.com , my plan is to ressurect the gbbtt (great
britain bus timetable ) as a big database of timetables in the form of a
wiki, so people can add their own comments or corrections and add there own
scans of more recent bus timetables.

anyway

the plan is to take the current csv files held by xephos, turn the body of the
timetbale information ( the time banks ) into a png, and keep the header
information as html, this means that because the body of numbers are a fixed
image they can’t get mashed up by differnet web browser configurations, and
the only text in the html is the destinations of the bus and the route number
for quicker easier searching.

anyway

so, i plan to write code that will correctly format the csv timetable body
into a sdl surface, which i then want to be able to save out as an image, so
if anyone can point me to some easy to adapt routines for saving out surfaces
as an bitmap image.

now i’m confusing myself :wink:

anyway - summing up

i hope to have a program that will take a directory of csv files and make them
into a html and timetable body image similar to -

http://www.solentblueline.com/timetables/sbltt/6.htm

any help / suggestions welcome!

the csv files look like this

http://www.cloudsprinter.com/random/csvfile.csv

neil wrote:

the csv files look like this

http://www.cloudsprinter.com/random/csvfile.csv


Why don’t you just use Image Magick

http://www.imagemagick.org/script/index.php

in your web server script to pump out an image for each “cell” in the
CSV file?

You could let people edit a CSV file of ammendments and also generate
images for these too.

It would be hardly any work and you can use Perl, PHP, Python, Ruby or
even C++, C whatever.

You can read in the CSV and do some really fancy formatting, even theme
the output images all from a script.

It would be a lot easier than re-inventing the wheel in SDL.

Hope this helps,

  • Tom

neil wrote:

the csv files look like this

http://www.cloudsprinter.com/random/csvfile.csv


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Why don’t you just use Image Magick

http://www.imagemagick.org/script/index.php

in your web server script to pump out an image for each “cell” in the
CSV file?

You could let people edit a CSV file of ammendments and also generate
images for these too.

It would be hardly any work and you can use Perl, PHP, Python, Ruby or
even C++, C whatever.

You can read in the CSV and do some really fancy formatting, even theme
the output images all from a script.

It would be a lot easier than re-inventing the wheel in SDL.

Hope this helps,

  • Tom

Hello neil,

You can use either Corona or DevIL to handle loading and saving
images. It should only be a little work to make these libraries use an
SDL surface.–
Best regards,
Peter mailto:@Peter_Mulholland