I'm having a similar issue, except that I couldn't upload any type of image for my watermarks. (Running Gallery3 RC2)
After a bit of judicious spelunking in the Gallery3 code looking for 'validation' and 'invalid_type', I ended up in gallery3/modules/forge/libraries/Form_Upload.php, near line 139.
It would appear that that upload form accepts or rejects the image based on the MIME-type sent by the browser(!).
A very quick and REALLY dirty workaround for me was to change the rule to accept everything by default, upload the new watermark, and revert the code change.
So I changed line 139 of gallery3/modules/forge/libraries/Form_Upload.php from
// Allow nothing by default
$allow = FALSE;
to
$allow = TRUE; // TODO: Revert this dirty hack!!!
Then the transparent PNG was accepted without a hitch.
I tried changing the Graphics to ImageMagick, which required going into Advanced Prefs (apparently /usr/bin/ is sort of obscure to G3), then tried clearing Old Files and my png was still rejected.
Found this and it worked perfectly for me...could it be a mime-type issue with Firefox-based browsers? I'm using bleeding edge Seamonkey build....
Quote:
* cc vor0nwe added
* status changed from closed to reopened
* version changed from GIT HEAD to 3.0 RC 2
* resolution worksforme deleted
* milestone changed from 3.0 RC 2 to 3.0
I'm having a similar issue, except that I couldn't upload any type of image for my watermarks. (Running Gallery3 RC2)
After a bit of judicious spelunking in the Gallery3 code looking for 'validation' and 'invalid_type', I ended up in gallery3/modules/forge/libraries/Form_Upload.php, near line 139.
I haven't looked at it very thoroughly, but it would appear that that upload form accepts or rejects the image based on the MIME-type sent by the browser(!).
A very quick and REALLY dirty workaround for me was to change the rule to accept everything by default, upload the new watermark, and revert the code change.
So I changed line 139 of gallery3/modules/forge/libraries/Form_Upload.php from
// Allow nothing by default
$allow = FALSE;
to
$allow = TRUE; // TODO: Revert this dirty hack!!!
Then the transparent PNG was accepted without a hitch.
Could someone adjust that test so that it'll accept a file based on it actually being a valid file format? Or, if that's too difficult, by file extension?
bharat
Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2010-08-21 17:59
@heycd: We expect /usr/bin to be in the PATH for your web server. Is it not? That'd be really weird. What's your server's PATH set to? Check your phpinfo for that.
I'd renamed them to watermark.* as well, to no avail.
floridave wrote:
Also make sure you are running the most recent experiential code from GIT as well. The RC2 version did not work for me.
Ah, so it might have been fixed in the meantime. I only tried it with RC2. I'll see if I can get the code from git, and test it again. This probably won't be before Wednesday.
umbralechoes
Joined: 2010-03-15
Posts: 7
Posted: Thu, 2010-10-07 01:44
Quote:
I tried changing the Graphics to ImageMagick, which required going into Advanced Prefs (apparently /usr/bin/ is sort of obscure to G3), then tried clearing Old Files and my png was still rejected.
Found this and it worked perfectly for me...could it be a mime-type issue with Firefox-based browsers? I'm using bleeding edge Seamonkey build....
I've had the same problem -- can't upload PNGs as watermarks, but I'm able to upload them as gallery files fine, and I can upload JPG and GIF files as watermarks fine too. I'm using ImageMagick 6.6.3-10. The only way I was able to upload a PNG watermark was by doing what you said. Thanks for the suggestion!
Edit: I'm also using the latest Chrome (6.0.472.63), but I also tried it on Firefox (3.6.10) and it still didn't work without using this trick. And I'm using the final release version of Gallery 3.0.
Posts: 4
I'm having a similar issue, except that I couldn't upload any type of image for my watermarks. (Running Gallery3 RC2)
After a bit of judicious spelunking in the Gallery3 code looking for 'validation' and 'invalid_type', I ended up in gallery3/modules/forge/libraries/Form_Upload.php, near line 139.
It would appear that that upload form accepts or rejects the image based on the MIME-type sent by the browser(!).
A very quick and REALLY dirty workaround for me was to change the rule to accept everything by default, upload the new watermark, and revert the code change.
So I changed line 139 of gallery3/modules/forge/libraries/Form_Upload.php from
// Allow nothing by default
$allow = FALSE;
to
$allow = TRUE; // TODO: Revert this dirty hack!!!
Then the transparent PNG was accepted without a hitch.
Posts: 7994
@vor0nwe: please provide us with a link to your watermark and I'll test it out as well.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 14
I tried changing the Graphics to ImageMagick, which required going into Advanced Prefs (apparently /usr/bin/ is sort of obscure to G3), then tried clearing Old Files and my png was still rejected.
Found this and it worked perfectly for me...could it be a mime-type issue with Firefox-based browsers? I'm using bleeding edge Seamonkey build....
Posts: 7994
@heycd: We expect /usr/bin to be in the PATH for your web server. Is it not? That'd be really weird. What's your server's PATH set to? Check your phpinfo for that.
I still can't reproduce this problem :-/
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 4
@bharat,
These are the files that didn't work originally:
http://home.martijn.coppoolse.com/test/%C2%A9%20Martijn%20Coppoolse%20%28watermark%29.png
http://home.martijn.coppoolse.com/test/%C2%A9%20Martijn%20Coppoolse%20%28watermark%29.jpg
http://home.martijn.coppoolse.com/test/%C2%A9%20Martijn%20Coppoolse%20%28watermark%29.gif
But as I said, after temporarily changing the FALSE to TRUE, the PNG one was accepted without problem.
I'll try and see if sending a different MIME-type changes anything.
Posts: 27300
vor0nwe,
I was able to add those as a watermark. What if you rename them without the © and spaces?
Also make sure you are running the most recent experiential code from GIT as well. The RC2 version did not work for me.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 4
I'd renamed them to watermark.* as well, to no avail.
Ah, so it might have been fixed in the meantime. I only tried it with RC2. I'll see if I can get the code from git, and test it again. This probably won't be before Wednesday.
Posts: 7
I've had the same problem -- can't upload PNGs as watermarks, but I'm able to upload them as gallery files fine, and I can upload JPG and GIF files as watermarks fine too. I'm using ImageMagick 6.6.3-10. The only way I was able to upload a PNG watermark was by doing what you said. Thanks for the suggestion!
Edit: I'm also using the latest Chrome (6.0.472.63), but I also tried it on Firefox (3.6.10) and it still didn't work without using this trick. And I'm using the final release version of Gallery 3.0.
Posts: 7994
Please file a ticket and attach your watermark image and we'll try to reproduce and fix it.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 7
Okay, ticket filed. Thanks!
Posts: 16504
Please post a link to the ticket. I was going to, but I can't find it.
https://sourceforge.net/apps/trac/gallery/report/1?asc=0&sort=created
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7
I reopened an old ticket that seemed to be the exact same issue.
http://sourceforge.net/apps/trac/gallery/ticket/797