php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19993 imagecopyresampled() does not use srcX and srcY
Submitted: 2002-10-19 13:08 UTC Modified: 2002-10-19 13:10 UTC
From: neo_starlocke at hotmail dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.2.1 OS: WinXP
Private report: No CVE-ID: None
 [2002-10-19 13:08 UTC] neo_starlocke at hotmail dot com
Function is question:
imagecopyresampled()

Problem:
arguments - srcX, srcY

Detail:
Running PHP with the php_gd2.dll extension, imagecopyresampled() failed to use the srcX and srcY arguments. It would always use (0,0) for the source (x,y) point, no matter if a variable (with a number) or a direct number was used in the function.

It becomes a problem when trying to make custom "closeup" thumbnails. Had to resort to imagecopyresized() which uses the arguments just fine.

Sample:

imagecopyresized($thumb, $temp, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH);
imagepng($thumb);

/// You'll note that the srcX and srcY won't work properly, at least on my system. I used the binary zip download of PHP.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-19 13:10 UTC] rasmus@php.net
This has been fixed in CVS for quite a while.  Grab the latest snapshot from snaps.php.net and try again.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 29 01:01:26 2024 UTC