Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 - 3 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: EXTGALLERY - Suggested fix for problem when downloading original image
by Mamba on 2014/2/17 14:26:14

Tom, nice catch!

It will be added to SVN (see this response)
EXTGALLERY - Suggested fix for problem when downloading original image
by tomodea on 2010/9/8 9:28:25

There is a logic error in public-download.php when you have chosen to use digital watermarks.

When a user uploads a low resolution photo, extgallery will store 3 versions of the image:
1. thumb size.
2. medium size.
3. original.

For higher resolution photos, there will also be a large size version.

If you are using digital watermarks the watermark will be applied to the thumb size, the medium size and the large size images but not the original image.

The relevant statements are:
le="color: #000000"><?php if($photo->getVar('photo_havelarge')) { if($permHandler->isAllowed($xoopsUser, 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") { $photoName = "original/".$photo->getVar('photo_orig_name'); } else { $photoName = "large/large_".$photo->getVar('photo_name'); } } else { $photoName = "medium/".$photo->getVar('photo_name'); }


This means that the original image will only be downloaded if we have a large size version otherwise the user will get the medium size version. If the medium size version does not have a digital watermark, the user will not notice the difference but if we are using digital watermarks then the user will get an “original” with a watermark.

My suggested changes are:
le="color: #000000"><?php if($permHandler->isAllowed($xoopsUser, 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") { $photoName = "original/".$photo->getVar('photo_orig_name'); } else { if($photo->getVar('photo_havelarge')) { $photoName = "large/large_".$photo->getVar('photo_name'); } else { $photoName = "medium/".$photo->getVar('photo_name'); } }

Regards, Tom O’Dea

Who's Online

897 user(s) are online (840 user(s) are browsing Support Forums)


Members: 0


Guests: 897


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits