php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58463 convolveimage
Submitted: 2008-12-17 09:36 UTC Modified: 2009-05-18 04:53 UTC
From: me at reso dot od dot ua Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.2.5 OS: Fedora
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: me at reso dot od dot ua
New email:
PHP Version: OS:

 

 [2008-12-17 09:36 UTC] me at reso dot od dot ua
Description:
------------
It doesn't seem like convolveImage is working. I ahve been trying to supply different simple matrixes but they have no effect on the resulting image at all. The same is happening with fxImage. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-17 09:38 UTC] mkoppanen@php.net
Hello,

fxImage returns a new imagick object. Are you sure you're operating on the correct object when testing?
 [2008-12-17 09:48 UTC] me at reso dot od dot ua
Thanks, I really did reference same object in fxImage case. I will try it once again tonight. In case of conolveImage it returns boolean, which is always true, but has absolutely no effect on the image. Please try following kernel which should reproduce the emboss effect:

$kernel=array( -1,-1, 1, -1, 0, 1, 0, 1, 1);
 [2008-12-17 09:53 UTC] mkoppanen@php.net
Hi,

here is a test script using your kernel:

http://valokuva.org/~mikko/convolve.php
http://valokuva.org/~mikko/convolve.phps

And here is the original image:
http://valokuva.org/~mikko/test.png

Seems to be working for me. What version on ImageMagick are you using?
 [2008-12-17 10:02 UTC] me at reso dot od dot ua
It's very strange.

We are currently using ImageMagick 6.4.1 10/02/08 Q16 (and latest stable imagick because we had various weird problems with later versions of ImageMagick. The latest one darkened the photo after Rotate/Skew ops.

It would also be great if you could add the functions to apply ordered dither to the image.

Thanks in advance.
 [2008-12-17 10:17 UTC] mkoppanen@php.net
I am closing this bug as I can not reproduce the issue here.
 [2008-12-17 11:31 UTC] me at reso dot od dot ua
Thanks.

I have tried it from the command line (convert) and it worked out correctly, however it doesn't work from Imagick. I will try building the .so from scratch again.
 [2008-12-18 07:39 UTC] me at reso dot od dot ua
I have tried building IM 6.4.7-9 yesterday from Source as well as CSV ver of imagick and php 5.2.8. convolveImage() has still no efefct on the resulting image. Could you please advise what else could I check? I have noticed that with 6.4.7-9 if you call sharpenImage() after either rotateImage() or shearImage() (I guess any function which is to do with virtual pixel) the image becomes almost black (very dark).
 [2008-12-18 12:24 UTC] me at reso dot od dot ua
I have tried building IM 6.4.7-9 yesterday from Source as well as CSV
ver of imagick and php 5.2.8. convolveImage() has still no efefct on the
resulting image. Could you please advise what else could I check? I have
noticed that with 6.4.7-9 if you call sharpenImage() after either
rotateImage() or shearImage() (I guess any function which is to do with
virtual pixel) the image becomes almost black (very dark).
 [2008-12-18 15:06 UTC] mkoppanen@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 [2009-05-15 03:23 UTC] me at reso dot od dot ua
convolveImage() has still no efefct on the
resulting image. I tried your example now and it does not work  
as well.
 [2009-05-15 05:09 UTC] mkoppanen@php.net
Can you test the following code:

<?php

$i = new imagick("test.png");
$i->setImageBias(10000);
$kernel = array( 0,1,0,
                 1,1,1,
                 0,1,0);

$i->convolveImage($kernel);

header('Content-Type: image/png');
echo $i;
 [2009-05-15 07:12 UTC] me at reso dot od dot ua
The problem is setImageBias is only making the picture a 
little brighter. convolveImage does not make any difference. I 
honestly don't know what to try.
 [2009-05-18 04:53 UTC] me at reso dot od dot ua
I have noticed that when refreshing the page with your example  
i.e. http://valokuva.org/~mikko/convolve.php it produces 
different results. Sometimes the image is completely black, 
sometimes it does apply some blur and sometimes it remains 
untouched.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 23:01:28 2024 UTC