Bug in frame_edges example while using multithreaded?

Post any defects you find in the released or beta versions of the ImageMagick software here. The ImageMagick maintainers carefully monitor this list and will work diligently to repair any reported problems. When posting a bug report, please specify both the ImageMagick version and operating system you are using.

Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-23T06:42:56+00:00

hi,

I was using the frame edges examples found on: http://www.imagemagick.org/Usage/thumbnails/#frame_edge and downloaded the script http://www.imagemagick.org/Usage/script ... ges.tar.gz

That was working fine until I switched to a multithreaded environment for image magick. Now some images/borders are distorted.

Try:
- Go to http://www.freeonlinephotoeditor.com
- click on effects
- click on golden frame
- now the left and top border have some distortions.

Any ideas how to solve/fix that? Strange thing is... try adding a second border (same golden one) and then it is ok??
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby magick » 2009-02-23T07:37:34+00:00

We need to reproduce the problem in our local environment. What is the command sequence you are using to create the framed effect? Also, which version of ImageMagick are you using?
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-23T07:49:30+00:00

version 6.4.8-9

in php I am using:
exec('/www/www.freeonlinephotoeditor.com/htdocs/scripts/frame_edges gold '.extractname($_REQUEST["imageFileName"]).' > '.$imagesurse.'');

frame edges script and images can be found here: http://www.imagemagick.org/Usage/script ... ges.tar.gz
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby magick » 2009-02-23T08:43:20+00:00

We tried the command with ImageMagick 6.4.9-6, the current release, and it works fine. Type

    identify -version

Does it include OpenMP in the output? We're wondering if its a transient bug in the OpenMP implementation of ImageMagick. Any chance you can download / install ImageMagick 6.4.9-6?
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-23T09:24:17+00:00

Version: ImageMagick 6.4.8-9 2009-01-29 Q16 OpenMP http://www.imagemagick.org

I probably can not get a new version installed.

The environment is exactly the same only now multithreaded enabled and that produces this bug. Everything else seems to work ok.
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby magick » 2009-02-23T09:32:04+00:00

Set the MAGICK_THREAD_LIMIT environment variable to 1 and see if that fixes the problem.
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-23T09:34:14+00:00

magick wrote:Set the MAGICK_THREAD_LIMIT environment variable to 1 and see if that fixes the problem.

Can I just edit the XML or do I need to restart something??

It seems I have no rights to change the configure.xml, so I will ask my hoster.
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-23T09:42:07+00:00

I will reply when I can test this. Tomorrow I away the whole day.
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby magick » 2009-02-23T10:46:22+00:00

You should be able to set the environment variable in your web script.
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-23T12:25:27+00:00

magick wrote:You should be able to set the environment variable in your web script.

how??
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby anthony » 2009-02-23T20:54:03+00:00

if calling from php, to run imagemagick from a bash shell use...
Code: Select all
  system("MAGICK_THREAD_LIMIT=1 convert .....");
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/
User avatar
anthony
 
Posts: 4013
Joined: 2004-05-31T19:27:03+00:00
Location: Brisbane, Australia

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-26T04:32:42+00:00

I did the test by setting the thread limit to 1 in the configure.xml.

And then I still had some strange artifacts, but a lot less.

I will ask my hoster to upgrade ImageMagick, but they are only able to do that next week.
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-26T04:42:37+00:00

anthony wrote:if calling from php, to run imagemagick from a bash shell use...
Code: Select all
  system("MAGICK_THREAD_LIMIT=1 convert .....");


Anthony,

is it also possible to add it in your frame_edge script??

I tried adding: MAGICK_THREAD_LIMIT=1 to the script, but that does not seem to work?
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Re: Bug in frame_edges example while using multithreaded?

Postby anthony » 2009-02-26T19:16:15+00:00

It only happens on specific versions of IM where threaded use was still getting fixed properly.
You can use it on my script the same way
system("MAGICK_THREAD_LIMIT=1 frame_script ....");

The syntax is BASH shell syntax. for other shells you may need to use

system("env MAGICK_THREAD_LIMIT=1 frame_script ....");

'env' is a command that also modifies the environemnt before running the command given (first item without an '=' in it) the BASH form is just a short cut (and slightly faster)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/
User avatar
anthony
 
Posts: 4013
Joined: 2004-05-31T19:27:03+00:00
Location: Brisbane, Australia

Re: Bug in frame_edges example while using multithreaded?

Postby bram12 » 2009-02-27T00:09:39+00:00

Thx, I added that and it works, but there is still some strange artifacts on the image.

Try the 2 different settings
- On http://www.freeonlinephotoeditor.com It is multithreaded. Repeat it bij going to 'effects' and then 'golden frame'.
- On http://www.fotoaanpassen.nl I added the MAGICK_THREAD_LIMIT=1. Do the same thing by going to 'effecten' and then 'Gouden Lijst'.

So still some strange noise in the image on a single thread.
bram12
 
Posts: 15
Joined: 2008-10-14T02:40:20+00:00

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests