PNG Watermark?

Taubin

Joined: 2009-07-20
Posts: 10
Posted: Mon, 2009-07-27 22:55

I'm trying to upload the watermark I use in Gallery 2 into my Gallery 3 install. When I attempt to upload the PNG file, the dashboard blinks, then shows the upload box again, it doesn't seem to upload the PNG file. I tried it with a JPG file, and it worked fine, however, I am unable to keep the transparency in a JPG. Is this a bug? Or, is something wrong with my Gallery 3 install? Thanks.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-07-27 23:48

I need to test this with G3, but are you using IE to upload the PNG file?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Taubin

Joined: 2009-07-20
Posts: 10
Posted: Mon, 2009-07-27 23:53

I always use firefox, however, I'll give IE a shot with the same file.

Just tried IE, and it is doing the same thing.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-07-28 01:08

Post the file here so we can test. I was able to add a .png and have it show on the items

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Taubin

Joined: 2009-07-20
Posts: 10
Posted: Tue, 2009-07-28 03:00

PNG is attached. Thank you all for the help

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-07-28 04:12

I mentioned IE, because IE is crap and has issues with standards and doesn't treat PNGs properly at all :)

However, your watermark uploaded just fine for me and I was able to apply it to all my images without problems. Which image toolkit are you using? I'm using ImageMagick.

sidenote, hmmm, the watermark module has a lot of polish and features that need to be added IMO
- apply to full size
- better position (like G2)
- multiple watermarks (like G2)
- if applying to thumbs and you can't have multiple watermarks it should resize the watermark to actually fit on the thumb
- choose if it can be applied to the thumbs or not
- choose which photos or albums have it applied

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Taubin

Joined: 2009-07-20
Posts: 10
Posted: Tue, 2009-07-28 04:20

I hate IE with a passion.... Thanks for testing it out, it's probably something on my server then. It's odd that it goes just fine for my gallery 2 install, but, bombs on my gallery 3 installation. I'll reload gallery 3 and try again.

Oh, and I'm using Imagemagik, although, I did try GD with the same result. Thanks again for the help, and for trying it out for me.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-07-28 04:56

Are you able to upload other images? Are you able to upload that png file as just an image and not a watermark? Are you able to upload other images as the watermark?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Taubin

Joined: 2009-07-20
Posts: 10
Posted: Tue, 2009-07-28 05:08

I'm able to upload other images with no problem, including that one into an album. http://shadowpioneer.com/gallery3/index.php/Misc And, I was able to upload JPG and GIF images to the watermark, just not PNG files. I tried three different PNG watermarks, with the same result. Hit upload, it flashes, and goes back to upload file.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-07-28 16:10

I can add the same image as well. So I suspect that it might be a filesystem permissions issue, Do you have a:
gallery3/var/modules/watermark/ direcotry?
If not create that give the server/php/gallery3 permissions to write to it and see if you can upload again. In that directory I get the image that I add through the G3 UI.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Taubin

Joined: 2009-07-20
Posts: 10
Posted: Tue, 2009-07-28 23:21

Yep, the directory is there and writable. Is it possible for me to simply upload the .png there and use it?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-07-28 23:28

I doubt it because the DB and Gallery will have no knowledge of it unless Gallery scans the directory which I doubt happens. Doesn't hurt to try, but I doubt it'll work.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Taubin

Joined: 2009-07-20
Posts: 10
Posted: Wed, 2009-07-29 00:36

Nope, didn't work, I'll toss up a second install of Gallery 3 as a test, and see if that one does, if not, I'll assume it's my server that's not allowing it.

 
JamieRood.com

Joined: 2009-07-29
Posts: 7
Posted: Wed, 2009-07-29 01:24

when I try to upload a .png the button to upload shows pressed and I just left it for an hour, but the nothing happens. the Window does not go away and no watermark shown

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-07-30 17:26

@JamieRood.com: what's in your gallery3/var/logs error logs?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
JamieRood.com

Joined: 2009-07-29
Posts: 7
Posted: Thu, 2009-08-06 02:11

<?php defined('SYSPATH') or die('No direct script access.'); ?>

2009-07-30 08:58:34 -07:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Duplicate entry 'Range' for key 2 - INSERT INTO `tags` (`name`, `count`) VALUES ('Range', 0) in file system/libraries/drivers/Database/Mysqli.php on line 142

prev day:

<?php defined('SYSPATH') or die('No direct script access.'); ?>

2009-07-29 12:46:46 -07:00 --- error: Uncaught Exception: @todo FORBIDDEN in file modules/gallery/helpers/access.php on line 176
2009-07-29 12:46:49 -07:00 --- error: Uncaught Exception: @todo FORBIDDEN in file modules/gallery/helpers/access.php on line 176

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-08-07 19:51

@JamieRood.com: can you give me a dump of your tags table from the database, and provide me with the .png that you're trying to upload?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Wed, 2009-08-12 02:09

I am having the same problem. I cannot upload PNG files as watermarks, but I can upload gif and jpg files.

One thing I found is that if I have a % character in the name then they seem to upload, but don't show up (meaning I see an edit and delete button, but no image).

Also is there a file size limit? I was testing random images and when I got to larger images 2.5MB it would spin for a while and then stop.

One other very odd occurrence is that every time I successfully upload a watermark a message appears at the top of the page that says "9 of your photos are out of date. Click here to fix them." 9 is the total number of images I have uploaded to gallery so far. I do not get this message uploading a normal image, only a watermark. If I click the "Click here to fix them" link the message goes away and does not come back until I upload a watermark.

My error logs are surprisingly empty, the only thing is:
<?php defined('SYSPATH') or die('No direct script access.'); ?>

2009-08-11 14:12:39 -05:00 --- error: Missing URL reference 'indicator.gif' in CSS file '/home/ryanmc/public_html/gallery3/lib/jquery.autocomplete.css'

It would be nice if there was some feedback on this page telling us when an image was successful or not, and why.

www.justechn.com

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Wed, 2009-08-12 18:42
ryanmc wrote:
I am having the same problem. I cannot upload PNG files as watermarks, but I can upload gif and jpg files.

One thing I found is that if I have a % character in the name then they seem to upload, but don't show up (meaning I see an edit and delete button, but no image).

Also is there a file size limit? I was testing random images and when I got to larger images 2.5MB it would spin for a while and then stop.

One other very odd occurrence is that every time I successfully upload a watermark a message appears at the top of the page that says "9 of your photos are out of date. Click here to fix them." 9 is the total number of images I have uploaded to gallery so far. I do not get this message uploading a normal image, only a watermark. If I click the "Click here to fix them" link the message goes away and does not come back until I upload a watermark.

My error logs are surprisingly empty, the only thing is:
<?php defined('SYSPATH') or die('No direct script access.'); ?>

2009-08-11 14:12:39 -05:00 --- error: Missing URL reference 'indicator.gif' in CSS file '/home/ryanmc/public_html/gallery3/lib/jquery.autocomplete.css'

It would be nice if there was some feedback on this page telling us when an image was successful or not, and why.

www.justechn.com

I just upgraded to todays (9/12/2009) build of code from github hoping that maybe something had been fixed since beta 2 was released. However, I still cannot upload PNG files for watermarks, and I still get the message "22 of your photos are out of date. Click here to fix them." whenever I add or delete a watermark (jpg or gif).

My log files are empty.

www.justechn.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-08-12 18:49
Quote:
I still get the message "22 of your photos are out of date. Click here to fix them." whenever I add or delete a watermark (jpg or gif)

I believe that's intended behavior. Right now, watermakrs are either applied to all images or not to any images.

As for PNG files, what browser are you using?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Mon, 2009-08-24 15:47
nivekiam wrote:
As for PNG files, what browser are you using?

Firefox 3.5.2

www.justechn.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-08-24 17:22

Hmm, I have a feeling that if I test your PNG on my server it'll work no problem. But just to eliminate that, could you post a PNG you're trying to upload and I'll try it in my installs.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Mon, 2009-08-24 17:49
nivekiam wrote:
Hmm, I have a feeling that if I test your PNG on my server it'll work no problem. But just to eliminate that, could you post a PNG you're trying to upload and I'll try it in my installs.

I'm sure it will, but here it is anyways.

If someone wants access to my gallery I can give it.

www.justechn.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-08-24 18:40

Yep, works just fine for me. What image toolkit are you using, GD or ImageMagick?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Mon, 2009-08-24 18:50
nivekiam wrote:
Yep, works just fine for me. What image toolkit are you using, GD or ImageMagick?

The Active Toolkit is listed as ImageMagick version 6.3.9

I activated GD, but it still won't upload PNG watermarks.

www.justechn.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-08-24 23:20

Works for me as well
ImageMagick version 6.5.2-9

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Tue, 2009-08-25 18:44

Ok I did a little digging into the code and I printed out some debug.
Here is the object for a watermark that works.

Form_Upload Object
(
    [data:protected] => Array
        (
            [class] => upload
            [value] => /home/ryanmc/public_html/gallery3/var/uploads/clearer_globe.jpg
            [name] => file
            [label] => Watermark
        )

    [protect:protected] => Array
        (
            [0] => type
            [1] => label
            [2] => value
        )

    [upload:protected] => Array
        (
            [name] => clearer_globe.jpg
            [type] => image/jpeg
            [tmp_name] => /tmp/phpNmRWRa
            [error] => 0
            [size] => 9242
        )

    [directory:protected] => /home/ryanmc/public_html/gallery3/var/uploads/
    [filename:protected] => 
    [method] => post
    [rules:protected] => Array
        (
            [0] => allow[jpg,png,gif]
            [1] => size[1MB]
            [2] => required
        )

    [matches:protected] => Array
        (
        )

    [callbacks:protected] => Array
        (
        )

    [is_valid:protected] => 1
    [errors:protected] => Array
        (
        )

    [error_messages:protected] => Array
        (
        )

)

Here is the watermark that did not work

Form_Upload Object
(
    [data:protected] => Array
        (
            [class] => upload
            [value] => 
            [name] => file
            [label] => Watermark
        )

    [protect:protected] => Array
        (
            [0] => type
            [1] => label
            [2] => value
        )

    [upload:protected] => Array
        (
            [name] => justechn_watermark_outline_1680.png
            [type] => image/png
            [tmp_name] => /tmp/phpjT1jZg
            [error] => 0
            [size] => 53020
        )

    [directory:protected] => /home/ryanmc/public_html/gallery3/var/uploads/
    [filename:protected] => 
    [method] => post
    [rules:protected] => Array
        (
            [0] => allow[jpg,png,gif]
            [1] => size[1MB]
            [2] => required
        )

    [matches:protected] => Array
        (
        )

    [callbacks:protected] => Array
        (
        )

    [is_valid:protected] => 
    [errors:protected] => Array
        (
            [invalid_type] => 1
        )

    [error_messages:protected] => Array
        (
        )

)

There are two things I noticed that are different and may matter
1. The value is empty in the Watermark that did not work

[data:protected] => Array
        (
            [class] => upload
            [value] => 
            [name] => file
            [label] => Watermark
        )

2. I get an invalid type from the watermark that did not work

[errors:protected] => Array
        (
            [invalid_type] => 1
        )

Hopefully this points to something that one of you can use to help me fix this.

www.justechn.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-08-25 18:57

It's really looking like either your version of ImageMagick or that it's compiled without support for PNG or there are missing libraries on your system because GD also fails with this:
Check the last post here to check for supported formats:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=11029&p=35238

I'm not 100% sure, but I'm wondering if the libpng libraries are not installed on your system.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Tue, 2009-08-25 19:15
nivekiam wrote:
It's really looking like either your version of ImageMagick or that it's compiled without support for PNG or there are missing libraries on your system because GD also fails with this:
Check the last post here to check for supported formats:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=11029&p=35238

I'm not 100% sure, but I'm wondering if the libpng libraries are not installed on your system.

I am able to upload PNG files into albums without any problems. Does that make a difference?

www.justechn.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-08-25 19:33

hmmmm, this makes absolutely no sense at all. It would make sense if you couldn't process PNGs at all, or if you couldn't process watermarks at all, but both...

Still nothing in your /var/logs files?

Have you updated from git since your last update?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Tue, 2009-08-25 19:46
nivekiam wrote:
Still nothing in your /var/logs files?

Nothing from either Apache or Gallery logs

nivekiam wrote:
Have you updated from git since your last update?

No

www.justechn.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-08-25 20:07

It'll probably be fruitless, but I'd try updating to the latest code. That's what I'm running and it's working just fine for me. Other than that, I've got to dig into the code to see what it's doing to try and reproduce this on the command line.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ryanmc

Joined: 2006-10-15
Posts: 72
Posted: Tue, 2009-08-25 20:13
nivekiam wrote:
It'll probably be fruitless, but I'd try updating to the latest code. That's what I'm running and it's working just fine for me. Other than that, I've got to dig into the code to see what it's doing to try and reproduce this on the command line.

Upgraded, no joy.
www.justechn.com

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Thu, 2009-08-27 10:13

I have the same problem - cannot upload .png watermark, but .gif will upload and display.
Using Gallery 3.0 git (pre-beta3)
No entry in gallery log file
Browser FF 3.5.2
GD 2.0.34

When you try to upload it seems that gallert trys to fetch the file but the dialog box does not change as it does with a sucessful upload.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-08-27 23:53

Please send me or nivekiam admin login info.
We are not abloe to reproduce this.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Fri, 2009-08-28 06:10

@floridave I'll PM you details

Paul

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-08-28 15:39

paulcobb,
Got your PM and was a was able to add a png image to an album but it did not have transparency.
On further investigation you only have GD as a image toolkit available. See if you can install IM or GM and activate one of those toolkits.
Then once that is operational then you should be able to do watermarks.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Fri, 2009-08-28 17:13

@floridave Thanks for that. I was also able to add a .png watermark image to the same album as you did, but these are being added as a photo and not as a watermark. My image still seems to have the transparency though. When trying to upload the same .png via the watermark upload the symptoms are as described before!

Paul

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-08-28 18:07

The issue I think is that your toolkit is not understanding the transparency properly in a normal album not a watermark.
if you compare the image I uploaded to your site versus the one on my site:
http://www.langleycom.com/gallery3/index.php/justechn_watermark_outline_1680.png
it maintained the transparency but on your site it did not.
let me upload your image to my site for comparison.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-08-28 18:25

You need to change toolkits! You still have GD activated.
Your image works for me as a watermark:
http://www.langleycom.com/gallery3/index.php/500x500/jet_500x500.jpg

Dave

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Fri, 2009-08-28 18:47

@floridave I can see that it works. I am awaiting my hosting provider to respond re toolkits.
I still don't understand why the watermark upload routine will not work with .png. Is there some link to available toolkits and suitablility for image processing that is preventing it on my setup

Paul

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-08-28 19:25

Let me know when your host gets back to you.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-08-31 15:36

Just to add more info. I switched to GD on my install and uploaded your PNG file. Transparency was destroyed. However, my version of GD, still applied the watermark. The transparency was still gone, but the watermark was still applied.

As for uploading working for PNG where uploading with the watermark module does not, they do use different methods.

Bottom line is that it looks like if you want PNG watermarks you have to use ImageMagick or possibly GraphicsMagick. But I'd try ImageMagick first. It'll be way more efficient to use ImageMagick over GD anyway, so it should be a win-win for you and your host.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Mon, 2009-08-31 15:45

Unfortunately my host is not being very cooperative regarding installing ImageMagick.
I have been studying ways of uploading the pre-compiled binaries onto my system (shared host - no root access). Others say this is possible but I am struggling here. This is not really my area.
Any suggestions please - apart from changing host.

Paul

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-08-31 15:55

With ImageMagick it is not possible. Well o.k. Maybe it's not impossible. If you have the same versions of the compiler and other stuff on a local system you could probably compile ImageMagick statically. But I don't know very much about doing that. I simply type apt-get install imagemagick and it's done and gets updated with security updates when I update my system. :) Or at my shared host, years ago, I let them know that the version of ImageMagick they had on their servers had a security hole in it. Magically ImageMagick was updated across their 1000s of servers in a couple of days :)

You only have 2 options I see right now, well o.k. 3 4
1) Change hosts
2) Don't use PNGs
3) Watermark before uploading
4) Find a linux geek, possibly paying them, that can help get ImageMagick binaries for you. Don't know if it'll work or not. I know I helped someone who had used/found ImageMagick binaries that someone had put together for Typo3. This was a very, very, every old version of ImageMagick. While it appeared that it worked fine for what very little image processing Typo3 does, it totally failed for Gallery.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
AndrewRH
AndrewRH's picture

Joined: 2009-02-05
Posts: 52
Posted: Mon, 2010-05-17 15:43

Hi,

Running Gallery3-RC1 with the Watermark module enabled - rebuilt all my images, or so I thought. Progress bar merrily went through all my images but never said why 'Updated:' was stuck at 0. Only at very end, after closed the pop-up dialog was I able to look at the log file - it said exceptions happened for every file!

1. I am querying HostPapa if their installation of Imagemagick supports PNG (I moved Gallery3 from 1&1 recently);
2. I would like to see 'Errors:' or perhaps even a 'abort/ignore/retry' instead of it appearing to progress (the bar);
3. Thanks again for progressing Gallery3 and all your effort put into it!

I turned off Watermarks and am now rebuilding the images/thumbnails...successfully this time I think because 'Updated' is advancing as well as the progress bar.

~Andrew~

Task Rebuild Images started (task id 23)
Unable to rebuild images for 'ARH20090620-25383 (Large)'
exception 'Kohana_Exception' with message 'The specified image, /homepages/36/d183424680/htdocs/gallery/var/modules/watermark/watermark.png, is not an allowed image type.' in /home/aiwlgqrd/public_html/Reeves-Hall/gallery/system/libraries/Image.php:309
Stack trace:
#0 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/modules/gallery/helpers/gallery_graphics.php(120): Image_Core->composite('/homepages/36/d...', 200, 121, 41)
#1 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/modules/gallery/helpers/graphics.php(162): gallery_graphics_Core::composite('/home/aiwlgqrd/...', '/home/aiwlgqrd/...', Array)
#2 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/modules/gallery/helpers/gallery_task.php(76): graphics_Core::generate('gallery_graphic...', Array)
#3 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/modules/gallery/helpers/task.php(90): gallery_task_Core::rebuild_dirty_images(Object(Item_Model))
#4 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run(Object(Task_Model))
#5 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/modules/gallery/controllers/admin.php(57): Admin_Maintenance_Controller->run('gallery_task::r...', Array)
#6 [internal function]: Admin_Controller->__call('23')
#7 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/system/core/Kohana.php(330): ReflectionMethod->invokeArgs('23')
#8 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/system/core/Event.php(208): Kohana_Core::instance(Array, Array)
#9 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/application/Bootstrap.php(67): Event_Core::run('maintenance', Array)
#10 /home/aiwlgqrd/public_html/Reeves-Hall/gallery/index.php(91): require('/home/aiwlgqrd/...')
#11 {main}

---
http://Reeves-Hall.net
http://Whitchurch.org.uk

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2010-05-18 16:24

Huh, that's weird. Can you go into system/libraries/Image.php and modify the code so that we can see what image type you've got there?

Change this code:

   305                  $image_info = getimagesize($overlay_file);                                            
   306                                                                                                        
   307                  // Check to make sure the image type is allowed                                       
   308                  if ( ! isset(Image::$allowed_types[$image_info[2]]))                                  
   309                          throw new Kohana_Exception('The specified image, :type:, is not an allowed im\
age type.', array(':type:' => $overlay_file));                                                                

to this:

   305                  $image_info = getimagesize($overlay_file);                                            
                        Kohana_Log::add("error", "image info: " . print_r($image_info,1));
   306                                                                                                        
   307                  // Check to make sure the image type is allowed                                       
   308                  if ( ! isset(Image::$allowed_types[$image_info[2]]))                                  
   309                          throw new Kohana_Exception('The specified image, :type:, is not an allowed im\
age type.', array(':type:' => $overlay_file));                                                                

(see the extra line below line 305. Then look in your error log for a string that says "image info" and report that back here. If I had to guess, I'd say that somethings wrong with the mime type detection on your system.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
emanuelis

Joined: 2010-06-29
Posts: 5
Posted: Mon, 2010-07-12 14:01

I tried to upload a watermark to G2RC2. "3 in 1" problems.

1. Neither GIF nor JPG nor PNG files were accepted. (validation.invalid_type).
2. Dialog is too small for content (a horizontal scroll bar appears).
3. Something wrong with encoding. My localized UTF8 Gallery works perfectly except this one dialog after upload error.

gallery3/var/log doesn't show anything interesting (only some old 404 errors).
Screenshot attached.

--
http://www.emanuelis.eu

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-07-12 15:26

emanuelis, what graphics toolkit are you using? If GD, try ImageMagick under Admin > Settings > Graphics
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
blaufotograph

Joined: 2007-07-30
Posts: 53
Posted: Tue, 2010-07-13 11:02

I also opened a new thread for this, and I'am still using firefox browser.

In this thread you were focused hard to the ie ;-)

I think it's a general problem.

----
Homepage: http://reisen.blaufotograph.de
My Gallery Version:
* Version: 3.0 RC2 (Santa Fe) with default wind theme.

 
emanuelis

Joined: 2010-06-29
Posts: 5
Posted: Tue, 2010-07-13 12:37

nivekiam, I was using GD. When changed to ImageMagick (had to add "/usr/bin" to PATH in graphics.php) none of my mentioned problems disappeared.
Picture resize works both with GD and ImageMagick.
Will try GraphicsMagic later.

--
http://www.emanuelis.eu