Black artifacts with modulate

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

Looks indeed similar.
Strangely i don't have the problem when i use his example image. :/

http://s8.postimg.org/izkvrqgph/c5cdc3e ... b8c0e2.jpg
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

Has anyone more ideas how to debug this? It's really a dealbreaker for me.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Black artifacts with modulate

Post by dlemstra »

Did you build ImageMagick with OpenCL enabled? Maybe this is an OpenCL issue.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

Yes i did.
I posted my build options here: https://www.imagemagick.org/discourse-s ... 50#p130289

Is imagemagick fully functional without opencl? I could build it without it then.
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

ok, reporting back.

With "--disable-opencl" the problem is gone!

Can someone explain to me what exactly opencl does and if i should report this somewhere?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Black artifacts with modulate

Post by fmw42 »

See http://www.imagemagick.org/script/archi ... istributed. Apparently IM automatically uses the GPU if available and OpenCL is enabled to process images faster than the CPU for certain IM functions. OpenCL must not work well on your platform/GPU or is buggy for whatever function you were trying to use or interfered with the processing of other functions.
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

Thx
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Black artifacts with modulate

Post by fmw42 »

Indeed, https://github.com/ImageMagick/ImageMag ... celerate.c shows that -modulate is one of the functions that is accelerated by OpenCL
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

Not sure why this is happening tho. I am using the proprietary nvidia drivers on Linux. At least performance wise the best you can get on this platform.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Black artifacts with modulate

Post by fmw42 »

I have heard that certain OS do not handle OpenCL well, but I know little more than that. One of the IM developers would have to comment further.
Andy
Posts: 30
Joined: 2014-03-23T03:06:04-07:00
Authentication code: 6789

Re: Black artifacts with modulate

Post by Andy »

Well, as far as i am concerned my problem is fixed but i am glad to help debuging this further.
Any suggestions how to get a dev in this thread?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Black artifacts with modulate

Post by fmw42 »

They will see it. dlemstra was the one that suggested to turn off opencl.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Black artifacts with modulate

Post by dlemstra »

I suspect this is an issue with the OpenCL software on your operating system. I also have an OpenCL enabled build and I cannot reproduce the issue. I will forward this post to an OpenCL export and ask if they can reproduce this on their system. It might take a while before you have an answer. For now you are probably better of with disabling OpenCL on your system.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Black artifacts with modulate

Post by fmw42 »

Dirk,

Would they not have to have his exact OS and GPU card to have a chance of reproducing the error?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Black artifacts with modulate

Post by dlemstra »

If it is a bug in the OpenCL driver we cannot fix it but maybe this is a bug in our OpenCL code. Just want to make sure its not the latter first.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply