Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Tk image resizer

by RonW (Vicar)
on May 05, 2014 at 22:45 UTC ( #1085124=note: print w/replies, xml ) Need Help??

in reply to Tk image resizer

Nice tool

Question: You say: Using Image::Resize the ratio is maintained for the original photo, ie only the width will be used, while the height will be adjusted as needed. If height is not used, why ask for it? Also, maybe there's a way to force resize to use it. If the height parameter is optional, then specifying it would be a way to indicate desire to force its use.

Replies are listed 'Best First'.
Re^2: Tk image resizer
by Discipulus (Monsignor) on May 06, 2014 at 07:23 UTC
    this was born as quick hack, as always..
    I think is simpler to remember that you need to pass a width X height x infix then others things. You can easyly modify the code to change both dimension if it is what you want (from module documentation):
    resize($width, $height, $constraint); Returns a GD::Image object for the new, resized image. Original image +is not modified. This lets you create multiple thumbnails of an image + using the same Image::Resize object. First two arguments are required, which define new image dimensions. B +y default resize() retains image proportions while resizing. This is +always what you expect to happen. In case you don't care about retain +ing image proportions, pass 0 as the third argument to resize().

    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1085124]
[usemodperl]: so to answer my question, no http at cpan, and all rationalized too, thanks
[marto]: this 'safe space' thing you have going on seems just like wanting to whine without anyone replying
[Corion]: usemodperl: Naah, if you scroll back, you'll find several approaches that still work. Maybe a prewrapped solution like CPAN::Mini is what you want. Or maybe App::FatPacker. But you don't seem to want to listen. That's OK.
[Corion]: There, there. It'll all be better.
[marto]: usemodperl "so to answer my question, no http at cpan," doesn't tie up with what you said "I can find cpan mirrors on http"
[usemodperl]: yea but http only has tar.gz, i wanna download modules with core perl, but http seems to make it impossible, that's my only question, how to find http mirrors like meta, or how to do it with core perl, but options now seem totally broken (on purpose :-(
marto wanders off
[usemodperl]: Corion it's really not misguided, it's the only way, to do something... wonderful IMHO
[Corion]: usemodperl: Why don't you set up your own (http-only) CPAN mirror? Or just fatpack your scripts? I wonder what problem you're trying to solve here.
[usemodperl]: don't worry about that, it's really cool, i promise!

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2018-06-24 16:27 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.