Image protection module need finishing!

awaragi

Joined: 2005-05-12
Posts: 1
Posted: Thu, 2005-05-12 20:31

Hi All,

First off, let me congratulate the team on their great work producting this application. I am quite impressed with the high quality of the code.

I just installed G2-beta-2 on my server and all is great. I wanted to do something to protect my pictures a little bit more than by simply watermarking them (either embeded or copyright notice).

I have a photographer friend who uses a very simple yet quite smart way of protecting his posted pictures. He slice them off into a grid of 6x6 pictures (using some combination of goLive/Imageready). This makes it quite frustrating to get all of his pictures. Anyway, I got thinking that this could be quite nice to automate and add as a module to gallery.

Being knowledgeable in PHP, I put in the base code for an image splitter which I am attaching here. Being new in Gallery, I am not sure how long it will take me to be able to put it into a module so I am hoping for someone's help to finish what I think is of great value to everyone.

If someone takes on making a module out of this, I hope that it would be included as a standard part of G2 and that my code to be released under the same license of G2.

The only issue I can think of using this module is that it is mutually exclusive with the watermark module unless someone can combine the two.

Keep up the great work.
Pierre

AttachmentSize
partition.zip83.84 KB
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-05-12 21:08

The idea is quite good indeed.

Issues:
- Performance: 5*5 = 25 times more downloadItem requests!
- The current layout code has to be changed.
- "A few" other changes might be necessary.

A few notes:
- G2 admins that welcome people that link G2 images in forums etc. won't be able to use this modification.
- The simplest way to protect your images is still requiring people to be logged in and have according item permissions. The logged in users may then still download your items easily...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-05-13 00:02

Since someone can just take a screenshot I'm not sure how much value this has, but we'll gladly provide guidance if you want to build it into a module..
Here are some initial thoughts..
You could create a new class that extends GalleryPhotoItem and provides a new render() function. This function would load the derivative children of the item that make up the partitions and output the html to display them in the right configuration. An ItemEditOption can turn this feature on/off for any photo (see Panorama module for example).. when a PhotoItem is made into a PartitionedPhotoItem it creates the derivative children with appropriate crop operation parameters. Derivatives source from original item or its preferred derivative so you should still be able to watermark the photo and have it partitioned. It would be some extra work to also support partitioning resize derivatives.