Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 18712
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: TONYC [...] cpan.org
Requestors: mario.menis [...] ptcommunication.it
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.50
Fixed in: (no value)



Subject: Paste method problem
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 458
Download (untitled) / with headers
text/plain 458b
Hi I've found that paste method result broke when paste a source image which bottom source exceed 600px I've notice the same problem even with "height" param when top + height Show quoted text
> 600px
Think that tha same issue will affect even crop method.. but I couldn't test enought. I'm using fedora 4 with kernel 2.6.11 x86_64 and perl 5.8.6. Compiled jpegsrc.v6b jpeg library for jpeg support under Imager 0.50. I've tested only jpg files. Hope I could help Bye Mario
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-14090-1145006812-1180.18712-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 255
Download (untitled) / with headers
text/plain 255b
Please provide some sample code that reproduces the problem. I had a look through the code involved in Imager and don't see anything wrong at first look. Code that reproduces the problem will let me diagnose and fix it as soon as possible. Thanks. Tony
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.3 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,HTML_50_60,HTML_MESSAGE
In-Reply-To: <rt-3.5.HEAD-14090-1145006812-1180.18712-6-0 [...] rt.cpan.org>
X-Mailer: Evolution 2.0.3
Received-SPF: pass (x1.develooper.com: local policy)
References: <RT-Ticket-18712 [...] rt.cpan.org> <rt-3.5.HEAD-14090-1145006812-1180.18712-6-0 [...] rt.cpan.org>
Reply-To: mario.menis [...] ptcommunication.it
Content-Type: multipart/alternative; boundary="=-RYiLjq5hBOwVsnWO+75j"
X-Virus-Scanned: amavisd-new at ptgroup.lan
Organization: PT Communication s.r.l.
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id D25CC4D80AC for <cpan-bug+imager [...] diesel.bestpractical.com>; Fri, 14 Apr 2006 05:35:46 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 7A2FD4D8004 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 05:35:46 -0400 (EDT)
Received: (qmail 14109 invoked by alias); 14 Apr 2006 09:35:37 -0000
Received: from nat.ptgroup.it (HELO pluto.ptgroup.lan) (212.17.202.2) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 14 Apr 2006 02:35:28 -0700
Received: from localhost (localhost.localdomain [127.0.0.1]) by pluto.ptgroup.lan (Postfix) with ESMTP id 0CC9113E90E for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 11:35:21 +0200 (CEST)
Received: from pluto.ptgroup.lan ([127.0.0.1]) by localhost (pluto [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06994-08 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 11:35:19 +0200 (CEST)
Received: by pluto.ptgroup.lan (Postfix, from userid 403) id 4671313E90D; Fri, 14 Apr 2006 11:35:19 +0200 (CEST)
Received: from layla.test.lan (Layla.ptgroup.lan [192.168.1.131]) by pluto.ptgroup.lan (Postfix) with ESMTP id 3AEF513E8BD for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 11:35:19 +0200 (CEST)
Delivered-To: cpan-bug+imager [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #18712] Paste method problem
Return-Path: <mario.menis [...] ptcommunication.it>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+imager [...] diesel.bestpractical.com
Date: Fri, 14 Apr 2006 11:35:19 +0200
Message-Id: <1145007319.2540.7.camel [...] layla.test.lan>
To: bug-Imager [...] rt.cpan.org
From: "Mario Menis - PT Communication S.r.l." <mario.menis [...] ptcommunication.it>
RT-Message-ID: <rt-3.5.HEAD-14105-1145007352-1682.18712-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: utf-8
Content-Length: 1202
Download (untitled) / with headers
text/plain 1.1k
Hi! This is what I've found: use strict; use Imager; my $ImgFile1 = "./template/promemoria/messaggio.jpg"; my $img1 = Imager->new(); $img1->read(file=>$ImgFile1) or die $img1->errstr(); # This doesn't work ( well.. it result in a wrong pasting.. it seems that bottom (src_maxy) source img will set to max img height instead 610.. #$img1->paste(top=>544, # left=>72, # src_minx => 30,#30, # src_miny => 580,#715, # src_maxx => 120,#120, # src_maxy => 610,#728, # #height => 10, # #width => 90, # img=>$img1 # ); # This WORKS Imager::i_copyto($img1, $img1, 30, 715, 120, 728, 72,544 ); $img1->write(type=>"jpeg", file=>'mio.jpeg') or die $img1->errstr(); hope it can be usefull... Bye Mario Il giorno ven, 14-04-2006 alle 05:26 -0400, via RT ha scritto: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=18712 > > > Please provide some sample code that reproduces the problem. > > I had a look through the code involved in Imager and don't see anything > wrong at first look. Code that reproduces the problem will let me > diagnose and fix it as soon as possible. > > Thanks. > Tony
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 2638
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-14070-1145010138-273.18712-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 850
Download (untitled) / with headers
text/plain 850b
Ok, I think I see the problem now. The code is checking src_maxx instead of src_maxy when checking for bottom of image parameters. This means that: $im1->paste(src=>$im2, left => 20, right=>20, src_maxx => 20); or: $im1->paste(src=>$im2, left=>20, right=>20, src_maxy => 20); will produce unexpected results. In the first case because it sees src_maxx set and tries to use the undefined src_maxy, in the second case because src_maxy is ignored. If you change line 629 of Imager.pm from: if (defined $input{src_maxx}) { to: if (defined $input{src_maxy}) { and re-install that should fix the problem I see. If you get a chance please try this out to see if it fixes the problem for you. If it doesn't please let me know. I'll be doing a 0.51 release with this and 2 other fixes in the near future.
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.0 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,HTML_40_50,HTML_MESSAGE
In-Reply-To: <rt-3.5.HEAD-14070-1145010138-273.18712-6-0 [...] rt.cpan.org>
X-Mailer: Evolution 2.0.3
Received-SPF: pass (x1.develooper.com: local policy)
References: <RT-Ticket-18712 [...] rt.cpan.org> <rt-3.5.HEAD-14070-1145010138-273.18712-6-0 [...] rt.cpan.org>
Reply-To: mario.menis [...] ptcommunication.it
Content-Type: multipart/alternative; boundary="=-iPS9IEWA7ygUX1xgkyt8"
X-Virus-Scanned: amavisd-new at ptgroup.lan
Organization: PT Communication s.r.l.
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id A4E994D801A for <cpan-bug+imager [...] diesel.bestpractical.com>; Fri, 14 Apr 2006 06:34:46 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 53C9F4D8004 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 06:34:46 -0400 (EDT)
Received: (qmail 479 invoked by alias); 14 Apr 2006 10:34:37 -0000
Received: from nat.ptgroup.it (HELO pluto.ptgroup.lan) (212.17.202.2) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 14 Apr 2006 03:34:28 -0700
Received: from localhost (localhost.localdomain [127.0.0.1]) by pluto.ptgroup.lan (Postfix) with ESMTP id CB8E913E921 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 12:34:22 +0200 (CEST)
Received: from pluto.ptgroup.lan ([127.0.0.1]) by localhost (pluto [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08228-02 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 12:34:19 +0200 (CEST)
Received: by pluto.ptgroup.lan (Postfix, from userid 403) id B70DF13E8E1; Fri, 14 Apr 2006 12:34:19 +0200 (CEST)
Received: from layla.test.lan (Layla.ptgroup.lan [192.168.1.131]) by pluto.ptgroup.lan (Postfix) with ESMTP id AC74D13DE69 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 12:34:19 +0200 (CEST)
Delivered-To: cpan-bug+imager [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #18712] Paste method problem
Return-Path: <mario.menis [...] ptcommunication.it>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+imager [...] diesel.bestpractical.com
Date: Fri, 14 Apr 2006 12:34:19 +0200
Message-Id: <1145010859.2540.12.camel [...] layla.test.lan>
To: bug-Imager [...] rt.cpan.org
From: "Mario Menis - PT Communication S.r.l." <mario.menis [...] ptcommunication.it>
RT-Message-ID: <rt-3.5.HEAD-14105-1145010906-1433.18712-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: utf-8
Content-Length: 1259
Download (untitled) / with headers
text/plain 1.2k
Sure!!! So i've got the problem over 600px because my src img was effective 600 px width !!!! I've correct that line and now it works perfectly!! Tanks very much! Wish a good day and nice easter! Tnx Mario Il giorno ven, 14-04-2006 alle 06:22 -0400, via RT ha scritto: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=18712 > > > Ok, I think I see the problem now. > > The code is checking src_maxx instead of src_maxy when checking for > bottom of image parameters. > > This means that: > > $im1->paste(src=>$im2, left => 20, right=>20, > src_maxx => 20); > > or: > > $im1->paste(src=>$im2, left=>20, right=>20, > src_maxy => 20); > > will produce unexpected results. > > In the first case because it sees src_maxx set and tries to use the > undefined src_maxy, in the second case because src_maxy is ignored. > > If you change line 629 of Imager.pm from: > > if (defined $input{src_maxx}) { > > to: > > if (defined $input{src_maxy}) { > > and re-install that should fix the problem I see. > > If you get a chance please try this out to see if it fixes the problem > for you. If it doesn't please let me know. > > I'll be doing a 0.51 release with this and 2 other fixes in the near future. >
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 2218
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.3 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,HTML_50_60,HTML_MESSAGE
In-Reply-To: <rt-3.5.HEAD-14070-1145010138-273.18712-6-0 [...] rt.cpan.org>
X-Mailer: Evolution 2.0.3
Received-SPF: pass (x1.develooper.com: local policy)
References: <RT-Ticket-18712 [...] rt.cpan.org> <rt-3.5.HEAD-14070-1145010138-273.18712-6-0 [...] rt.cpan.org>
Reply-To: mario.menis [...] ptcommunication.it
Content-Type: multipart/alternative; boundary="=-/uN1wCcyDQPBqLrDbfjn"
X-Virus-Scanned: amavisd-new at ptgroup.lan
Organization: PT Communication s.r.l.
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 14CF34D8005 for <cpan-bug+imager [...] diesel.bestpractical.com>; Fri, 14 Apr 2006 07:30:37 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id B7B414D8004 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 07:30:36 -0400 (EDT)
Received: (qmail 18293 invoked by alias); 14 Apr 2006 11:30:27 -0000
Received: from nat.ptgroup.it (HELO pluto.ptgroup.lan) (212.17.202.2) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 14 Apr 2006 04:29:43 -0700
Received: from localhost (localhost.localdomain [127.0.0.1]) by pluto.ptgroup.lan (Postfix) with ESMTP id 4BD3F13E8F8 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 13:29:28 +0200 (CEST)
Received: from pluto.ptgroup.lan ([127.0.0.1]) by localhost (pluto [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08832-05 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 13:29:27 +0200 (CEST)
Received: by pluto.ptgroup.lan (Postfix, from userid 403) id F2BD713E835; Fri, 14 Apr 2006 13:29:26 +0200 (CEST)
Received: from layla.test.lan (Layla.ptgroup.lan [192.168.1.131]) by pluto.ptgroup.lan (Postfix) with ESMTP id E818B10F8B7 for <bug-Imager [...] rt.cpan.org>; Fri, 14 Apr 2006 13:29:26 +0200 (CEST)
Delivered-To: cpan-bug+imager [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #18712] Paste method problem
Return-Path: <mario.menis [...] ptcommunication.it>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+imager [...] diesel.bestpractical.com
Date: Fri, 14 Apr 2006 13:29:26 +0200
Message-Id: <1145014166.2540.18.camel [...] layla.test.lan>
To: bug-Imager [...] rt.cpan.org
From: "Mario Menis - PT Communication S.r.l." <mario.menis [...] ptcommunication.it>
RT-Message-ID: <rt-3.5.HEAD-14093-1145014242-1231.18712-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: utf-8
Content-Length: 334
Download (untitled) / with headers
text/plain 334b
Just find another problem about it... in some cases bottom coords still exit wrong.. I've found this in the Imager.pm on line 649 ( I think you line is 4/5 line upper) $src_bottom > $r and $src_bottom = $b; And changed in: $src_bottom > $b and $src_bottom = $b; This seems to fix it.. Hope to be helpful.. Bye Mario
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 693


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.