Hi!
I am (slowly) developing a site for a small independent photo agency *). I feel that a lot of the functionality that I need is already in Drupal core and contrib, but there are certain points that I need to address, probably through developing a few new modules. (Theming is obviously an important part of it too, but that's another story.)

I have a few ideas on how to implement the functionality that I need and some choices to make, so I'm hoping for some comments and wisdom from the community. Also, if someone else is already doing or has done anything like this, that would be good to know. Hopefully this could turn into a solution that other picture agencies can use, or even better, a set of general modules that can be used in many different contexts.

In short, I need too look at 1) the handling of large image files and the quality of resized images, 2) a specific image search function and 3) ecommerce integration.

Below are my thoughts so far – sorry for the long post. Please look at the parts that interest you and state your opinion! Thanks!

/zoo33

*) A photo agency is a company that works with different photographers and maintains a large archive of images that it sells to different types of media: newspapers, magazines, web sites, books etc.

1. Image handling

Problems:
– High resolution images are impractical to upload via html forms.
– Picture agencies need good quality in their downscaled images, especially with the "composition images" that people download for free to try the images out before they buy.
– There is often usable information stored in the images' metadata that should be picked up automatically and stored in the database.

Solution: hiresimage.module / bigimage.module / photograph.module

This module should provide an interface for creating regular image nodes from high resolution image files. The idea is that this module will act as an extension to image.module through nodeapi. The high resolution image is scaled down to a resolution that the admin can choose and with fine grained quality settings including sharpening and color profile conversion (using Imagemagick).

The resulting file is what I'll use for the "comp image" and that is also used as image.module's "original" file (which is then scaled down to thumbnails etc. depending of what you specify in image.module's settings). This way we can assign specific logic to the high resolution image while still maintaining all of image.module's functionality (galleries, integration with other modules etc.).

The hi-res images can either be uploaded to a certain directory on the server or through an html form. The module should also be able to read metadata from the image file and put that in the node info. (This is basically a rip-off of audio.module's functionality.)

Possible problem: Will it be possible for this module to call the appropriate functions in image.module to create the image nodes? Or will it have to duplicate image.module's functionality for saving to the database?
Would it be easier to just fork image.module and have it emulate all of image.module's behaviour?

2. A great image search function

It is super important that images can easily be found by the clients. We need a search function where only image nodes show up in the results. They should be rendered as a thumbnail gallery, not the bulit-in Drupal way with a teaser list. We need the ability to filter depending of image orientation and similar. Maybe provide the possibility to do sub searches, that is, search within an already existing search result (which is basically the same thing as searching for two keywords).

Solution: image_search.module
Well, I suppose this is fairly easy to achieve through the search api functions or even custom sql queries.
This module could provide it's own gallery presentation for result pages or perhaps use the gallery bundled with image.module somehow. Or maybe it's just a matter of theming the standard search result pages?

3. Ecommerce integration.

In this case we won't actually be selling file downloads, not primarily anyway. The clients (or some of them) will be allowed to download high-res images without paying online, but instead they'll get billed afterwards. The pricing depends of how they used the image (print/web, circulation, size, cover etc.).
We might also consider the possibility to pay online for individual image downloads, possibly using a royalty free business model in that case.
The images all follow the same price list, so there is no use assigning prices to individual images.

Solution 1: hires_image_product.module
Develop a solution for letting my image nodes act as ecommerce file products. Perhaps by using ec_media.module? I'd like for the images to become products automatically as all hires images in my case are products.

Solution 2: A new payment method for billing? Or could I use COD?

Solution 3: The variable price should be possible to work out with existing Ecommerce functionality i think. However, it would be kind of a detour to assign prices to individual images and then vary that price depending on different variables (which I think is what the usual approach is).
A better solution would be if my product type didn't have a price tag at all but rather was able to fetch it from a price list depending on some user input. (Flexicharge is supposed to handle shipping charges only, right?)

Solution 1B: Maybe my case is so different from a regular ecommerce site that it would be easier do develop this part from scratch? There is a lot of functionality in ecommerce that I don't need.

Again, thanks for reading! /zoo33

Comments

rbrooks00’s picture

Very interesting project! I don't have anything concrete to add at this time other than to say that IMHO people should draw on istockphoto.com very heavily for design ideas here as I think they've pretty well nailed all of these problems with a good solution.

============================================
BuyBlue.org

sepeck’s picture

But I do believe that image module has an API model that will allow you to make calls to it rather then copy code in a new module. See the included image_gallery module included in the download for an example of this. Building on and improving existing is the good way to go about this. :D

Image module also has the ability to use image magic if installed on the system. I haven't tried it so that may also help with quality control if the GD toolkit isn't sufficient.

In the module dev handbook there is an example of how to check if another module is active/present and how to turn it on or supply an error message.

If you are going to match leverage the image module (rather then re-invent which is really cool) may I suggest image_hires.module / image_big.module / image_photograph.module. I would suggest contacting james walker (current image module maintainer as I suspect he'd be happy to include them in the image module download and collaborate on image module development as well.

Also, look at shazamgallery as a posible display tool which may or may not help fill some of your needs.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

zoo33’s picture

Thanks for your comments!

Yes, I think it would be desirable to build on top of image.module rather than replacing it, and I'll certainly try to do that as much as I can. I suspect that I will end up modifying small parts of image.module's code though, but the goal is that all modules will be fully compatible with the stock version of images.module. If they would be accepted as bundled contrib modules for image.module, that would be awesome!

sepeck’s picture

Just came across this one fro the Google Summer of Code stuff.
http://drupal.org/project/imagemagick

Hit walkah's contact and send him a message. Your project would definitly be cool stuff to add on.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

zoo33’s picture

Yeah, I read about that project but I didn't know they'd actually come that far and that their plans were so grand. A lot of that stuff will make thing easier for me I think. And if this is where images in Drupal are heading, I need to follow that rather than the current image.module.

Thanks!

zoo33’s picture

I think maybe I misread something. It seems they're not rebuilding image.module but rather adding to it. Anyway, the new imagemagick library will probably be good stuff for me.

sepeck’s picture

adding to and extending being in general 'a good thing(TM)'. :D

I linked it as it was an image related on going project that might be of interest to you. While I myself am not implmenting complex photo sites, I do know a friend who take's photo's as a hobby and wants me to build a site for him so I may end up benefiting from your work when I get around to it.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

zoo33’s picture

I just skimmed through schazamgallery's code. It's an interesting project for me as it uses the same approach: extending image.module rather than replacing it.
I'm not sure I need the galleries-as-nodes stuff, but I'll possibly use schazam to some degree.

It seems like it doesn't actually build the gallery presentation itself but rather outputs the images as teasers (through views.module) which seems like a smart approach to me. The teaser view for images can then be themed however you like.

michelle’s picture

Do your images have to be nodes? If not, have a look at Gallery ( http://gallery.menalto.com/ ). It integrates pretty nicely with Drupal, but images are not nodes.

Michelle

zoo33’s picture

Yes, I've used that on occation to publish galleries to the web. I think I rather see that as an alternative to Drupal rather than a useful Drupal component – they're quite separate even when one is running within the other. I'm sure you could build a photo agency's site on top of Gallery as well though. However, I choose Drupal for now.

rbrooks00’s picture

Take a read of this: http://webschuur.com/node/641 it may be worth talking to Ber Kessels about this. Drupal didn't work for him but it seems like he probably thought about the scope of problems and might have had solutions to them, maybe even some code sitting around. Might give you a jump start.

============================================
BuyBlue.org

zoo33’s picture

Yes, we've been discussing that on the devel mailing list. It basically boils down to how much time you're willing to put into adapting Drupal to your needs.