Hi, thanks for looking at my project. This should be an interesting one for a clever programmer.
We have a tab-delineated text flatfile database, which contains image URLs in it.
What we need is this — a script which reads the database and then uses imagemagick to do the following:
- Using the URL in a specific field of the database, loads that image into Imagemagick.
- Tells Imagemagick to write the contents of a different field (of that record) as text onto the image.
- Saves the image to a different directory, with the same name.
The text that is being written is a price … so it needs to be formatted appropriately … with a $ in front of it, and if the text contains exactly 5 digits, there should be a comma between digits 2 and 3 (i.e., $23,000).
That’s it … the only other trick is that the image URLs are all for remote sites, but the photos are all in a folder on our server. Therefore, the script needs to only look for the actual filename in the directory on our server.
For example … if the image URL is:
http://imgs.getauto.com/imgs/ag/ga/29/24/1/JM3ER29L970132924-1.jpg
The actual file the script should be loading is:
http://www.autopages.com/feedphotos/JM3ER29L970132924-1.jpg
In other words, all images are in our /feedphotos/ directory.
Thanks and let me know if you have any questions!