Page 2 of 2

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-01T00:18:11-07:00
by bram12
anthony wrote:Can you post a small example of the noise?

Have you tried modifying the script to output intermediate images so as to track where the noise is being added?
You Can see it yourself by doing the steps I mentioned in the previous post and also see there the different between 1 thread and 8.

I have not tried to display the intermediate results.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-01T07:41:28-07:00
by bram12

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-01T17:57:11-07:00
by anthony
Well it is in the very early stages, The same noise pattern is repeating so it happened before the tiling. process.

But it is horizontal bands in the same image but appears after the transpose.


In fact the very next step is append the left and right images together in preparation to inserting space between them and then tiling into a '-frame' template.

As the horizontal bands do not continue to the right side, it must happen before the append.

I retested the script and it also works fine on my system. However I build with a
--disable-openmp configuration option which turns off multi-threading.

I'll try it again after removing that flag.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-02T08:14:23-07:00
by bram12
I updated the imagemagick version to 6.4.9-8 and the following happens:
- Golden border works fine now.
- Black border still has noise.

To repeat:
- Go to http://www.freeonlinephotoeditor.com/
- Click on 'effects'
- Click on 'black frame'.

See image for example output:
Image

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-02T17:06:21-07:00
by anthony
I have been playing with it and it seems that particular set of images has all the problems. Though bamboothin also seems to have problems...

Investigating.

PS: I have already improved the scritp with better usage output and listing the edging image styles available.

PPS: Now would be a good time to add new framing edging images.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-02T19:52:24-07:00
by anthony
It is a highly variable problem that depends a lot on when and where commands are run. It is likely caused by multi-threading, however when the problem is happening, using MAGICK_THREAD_LIMIT=1 does NOT help!

I will try to isolate the problem further, but it is like a slippy fish, dissappearing as a smallest change.


I have re-packaged my changes to the script, and it will appear on the main site in a day or too. look for the file date change in the scripts area
http://www.imagemagick.org/Usage/scripts/


The script can now automatically accommodate new edging images being added to the edge_images/ sub-directory, and in fact most 'styles' are handled automatically in that way. Though for some edges tweeking the 'style' colors, or top to bottom conversion method, may be a good idea. More comments have been added to the script, as to the meaning of the style control variables.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-02T20:40:53-07:00
by anthony
Further isolation of the bug.

download from the IM images area a blackthin images and convert to png

Code: Select all

convert http://www.imagemagick.org/Usage/images/blackthin_top.gif t.png
Now load two copys and splice, and the problem appears for the second image!

Code: Select all

convert -background none t.png t.png   -splice 0x84+0+0 show:
The first image shown is fine, the second has become randomly transparent!!!!

But only with this exact command, any attempt to make it simpler, such as remove the first image, makes the problem disappear.

Also substituting a PNG format copy of the rose: image also makes the problem disappear. I think the GIF to PNG converted image may be important.

Adding the MAGICK_THREAD_LIMIT=1 does not fix the problem so it may not be a multi-threading problem but an initialization problem.

Cristy, please have a look...

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-03T18:52:19-07:00
by magick
We can reproduce the problem you posted and have a patch. Look for it in ImageMagick 6.4.9-9 Beta by sometime tomorrow.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-04T20:15:32-07:00
by anthony
While my specific test now succeeds, the problem has not been fixed!

Looking....

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-04T20:22:49-07:00
by anthony
While my previous test now succeeds, the problem has not been fixed!

Simplifying again, this time it is while appending two images.

download from the IM images area a blackthin images and convert to png

Code: Select all

convert http://www.imagemagick.org/Usage/images/blackthin_top.gif t.png
Now append the image twice and problem appears for the appended image in the result.

Code: Select all

convert -background none t.png t.png  -append show:
As before two image are required to generate the problem.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-06T22:20:40-07:00
by anthony
IM is now fixed with every frame I have tried. As mentioned before I also updated the framing script to be better and to handle straight addition of new frame edge images to the edge_image sub-directory.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-09T05:51:21-07:00
by bram12
Thx. everything seems to work ok now.

Re: Bug in frame_edges example while using multithreaded?

Posted: 2009-03-09T15:47:53-07:00
by anthony
If you come up with some new framing edge images, please contribute back to me :-)