Photo Organizer

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Backend / Core → Import
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version 2.36
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Photo Organizer
Opened by crystalshadow - 2008-09-26
Last edited by pizza - 2008-09-27

FS#388 - Watermarking source bug

I'm not completely sure if this is a bug or by design, but it prevents using a trasparent watermark which is driving me batty :p. When PO calls composite to watermark an image it is referencing the PREVIEW image of the watermark instead of the original image. This means if I upload a transparent PNG or GIF that it won't be transparent and looks weird to say the least.

Code currently supplies the following:
/usr/bin/composite -gravity 'southeast' -watermark '20' '/storage/photoorg/v0150/00001/20891_20763_2_preview.jpeg' '/storage/photoorg/v0150/00001/20900_20766_2_preview.jpeg' -quality '85' '/storage/photoorg/v0150/00001/20900_20766_2_preview.jpeg'

"Should" be:
/usr/bin/composite -gravity 'southeast' -watermark '20' '/storage/photoorg/v0150/00001/20891_o_original.png' '/storage/photoorg/v0150/00001/20900_20766_2_preview.jpeg' -quality '85' '/storage/photoorg/v0150/00001/20900_20766_2_preview.jpeg'

Closed by  pizza
2008-09-27 14:12
Reason for closing:  Fixed
Additional comments about closing:  Will be in 2.36.1
pizza commented on 2008-09-26 22:06

I'm guessing here, but I believe it does this intentionally, as it's possible the original watermark format can't be handled directly by imagemagick. Plus, it scales the watermark to the same rough dimensions as the preview target.. and also strips transparency if you're using jpg (as opposed to png) previews.

You do raise an interesting point though; using the original unmolested makes more sense IMO. This should be pretty straightforward to fix.

pizza commented on 2008-09-27 14:11

Actually it looks like a simple bug; it picks the first file in the database for the watermark image.

You'll need to apply this patch, then re-set the watermark image.;a=commitdiff_plain;h=29d5b2bed62397cab6a33a43a29bc2d7226698d4


Available keyboard shortcuts


Task Details

Task Editing