Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: resampling an image using GD not working on Linux

by Discipulus (Abbot)
on Dec 08, 2016 at 14:26 UTC ( #1177494=note: print w/replies, xml ) Need Help??


in reply to Re: resampling an image using GD not working on Linux
in thread resampling an image using GD not working on Linux

thanks stefbv for the feedback!

If I understand you added a print for field 1 and 2 of the current photo and you got a zero for the heigth?

This is probably a big design error from my part: I get width and heigth of the original pic from exif tags. Tags are read during the build list phase: i probably need to add a fall back method (using GD) to get anyway sizes if exif tags ones are not found.

If using the same photo you launch the program with the -debug flag you also view the current photo array dumped to the screen as received by the draw_photo sub.

In the following output the photo shows a width of 2560 and an heigth of 1920: you get a zero with your photo?

Considering files[0] C:\ulisse\img-renamer\2008_09_22_17_56_21_12.jpg photo data NOT defined for files[0] filled photo data for current: files[0] HERE draw_photo got: ------> C:\ulisse\path\photo.jpg|2560|1920|undef|undef|THUMB|PHOTO current 0 preload [1] filled files[1] photo data zero or other non significant increment for nex_pic OK loaded 2 photo data for files[0,1]

I added an issue to the github project.

While i still have many problems (no photos displayed) on Ubuntu I setup a Centos with perl 5.10 and GD 2.44 picwoodpecker runs quite well..

thanks again for your time and sorry for the late reply (here is big holiday weekend)!

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: resampling an image using GD not working on Linux
by stefbv (Curate) on Dec 09, 2016 at 08:24 UTC
    If I understand you added a print for field 1 and 2 of the current photo and you got a zero for the heigth?

    Yes, that is what I did.

    Forgot to mention that my OS is Slackware64 and GD is v2.56. With the '-debug' flag, the output is:

    Considering files[0] /home/.../picwoodpecker/2016_11_11_12_50_13_0.jpg photo data NOT defined for files[0] filled photo data for current: files[0] draw_photo got: /home/.../picwoodpecker/2016_11_11_12_50_13_0.jpg|2272|1704|un +def|undef|THUMB|PHOTO GD Warning: one parameter to a memory allocation multiplication is neg +ative or zero, failing operation gracefully

    Regards, Stefan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1177494]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-12-07 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (34 votes). Check out past polls.

    Notices?