Forum OpenACS Q&A: photodb html conversion

Collapse
Posted by Ben Koot on
Can anybody tell me how I can add the html image converter active on
the photodb http://www.photo.net/stock/html.tcl?photo_id=848 so I can
manipultaed my own immage into canned html?

Thanks for the help

Collapse
Posted by Henry Minsky on
It's easy to use ImageMagick to manipulate images on the server.
If you have it installed on your system, the unix program "convert"
will convert virtually any format and geometry into any other, and
can perform image compositing, text and graphics, etc.

AOLserver handles file uploads from browsers quite nicely, it will
create a temporary file for you, so you can just write your tcl script to copy the file to some archive directory, then execute "convert", and keep a pointer to the filename in your db.

There is some debate over whether to keep image files in the
database, or to keep them in the filesystem and just keep names in the database. I recommend keeping the image files in the filesystem in almost all cases.

Collapse
Posted by Hans Gaasenbeek on
I think it is not clear what Ben Koot means. In my view, he needs a 'canned html'-generator, not an image convertor. It should be fairly easy for anyone knowing tcl to write a script that automatically embeds the filename (in the filesystem) into a small piece of html, just like Greenspun did (I handicapped the html because otherwise the image shows up, even though I say this is 'plain text'):

a href=http://www.photo.net/photo/pcd0278/getty-center-bookstore-line-110.tcl
img src=http://www.photo.net/photo/pcd0278/getty-center-bookstore-line-110.1.jpg
photo courtesy  href="http://philip.greenspun.com/Philip Greenspun

You don't need Image Magick for that, but in the photodb images are allready resized by it, so it is possible to make links to thumbnails and full-size pictures as well.

Collapse
Posted by Robert Ezman on
How to add images to your web site is disscussed here:

Philip and Alex's Guide to Web Publishing: Chapter 6: Adding Images to Your Site
Collapse
Posted by Ben Koot on
Maybe I need to rephrase my problem. I use ACS to generate a web diary, and my readers appreciate both my writings, and a fresh picture everyday. Untill now I have been using photo.net stock photo's, wich provide me with a a simple canned html code to be inserted in the ACS bboard module.  However I need to have the same canned html format for my own immages. Philip somehow managed to build that feature into the photo.net module.

Effectively this is the biggest added value of the whole photodb system, and it is NOT avialable default which surprises me. From all the guestions our helpdesk has recived untill today, the most frequent one is how to achieve this simple action. I can not immagine this to be rocket sience, but to have this simple feature would mean a lot to me , and my clients. Folks, I am trying to create a marketable ACS based Media service, and realy hope one of you can tell me how to get this working. I tried a number of links on Phill's page on how to get pictures on a webpage but the most promessing ones are no longer active.
Thanks in advance.

Collapse
Posted by amit singh on
May be you check this thread.
Collapse
Posted by Rajeev Surati on
Hi ben.
I think what you want is the perl scripts I rewrote for philg sometime back for digital images.

http://www.photo.net/raj/digital

I think six-megapixels work

Basically you have to use createcanondesc.pl to create the write generator file and then maybe use the six-megapixels.pl file

you need perl to run on your sysetm along with imagemagick.

hope that helps.