digitalmars.D.announce - DMagick image processing with D.
- Mike Wey (10/10) Nov 02 2011 I'm happy to announce the first DMagick release.
- bearophile (4/5) Nov 02 2011 This looks like a quite useful package.
- Andrej Mitrovic (21/21) Nov 02 2011 sigmoidalContrast.d works, although draw.d doesn't:
- Mike Wey (5/26) Nov 03 2011 If you get displaying with GDI working it might be worth adding it to
- Andrej Mitrovic (5/7) Nov 03 2011 Yeah it is working, but I'll refactor it a little bit to make it more
- Mike Wey (4/11) Nov 04 2011 https://github.com/MikeWey/DMagick
- Andrej Mitrovic (5/15) Nov 04 2011 Sweet! Btw, your copydll.bat script calls a "where" utility but I
- Mike Wey (6/22) Nov 04 2011 I look like where is only included in recent Windows versions.
- Andrej Mitrovic (3/3) Nov 02 2011 Btw, with warnings turned on I get:
- Andrej Mitrovic (11/11) Nov 02 2011 It would be easier not having to register on a custom website just to
- Mike Wey (5/7) Nov 03 2011 I've thought about moving to Github, maybe i should finally look take
- Andrej Mitrovic (19/19) Nov 02 2011 I was trying to export pixels:
- Andrej Mitrovic (12/14) Nov 02 2011 I think I've found the issue:
- Andrej Mitrovic (2/2) Nov 02 2011 Ok I'll stop spamming here and report on your site, here's issue 1:
- Andrej Mitrovic (6/6) Nov 03 2011 I've started a new repo where I'll be writing some DMagick (win32)
- Mike Wey (7/13) Nov 03 2011 I've merged in the the fixes you added.
- Andrej Mitrovic (5/8) Nov 03 2011 Well it causes access violations on application start like I've
- fgimage (4/4) Jun 19 2013 it is a great project, i know it is kind of looking like an
I'm happy to announce the first DMagick release. DMagick is an object-oriented D API to the ImageMagick image-processing library. With an interface inspired by Magick++ and RMagick. DMagick requires a recent D2 compiler >= 2.054 and works with ImageMagick 6.6.0 and up. DMagick can be found here: http://code.mikewey.eu/p/DMagick/ Downloads: http://code.mikewey.eu/p/DMagick/downloads/ Documentation: http://dmagick.mikewey.eu/docs/ -- Mike Wey
Nov 02 2011
Mike Wey:I'm happy to announce the first DMagick release.This looks like a quite useful package. Bye, bearophile
Nov 02 2011
sigmoidalContrast.d works, although draw.d doesn't: Magick: unable to read font ` ghostscript_font_path n019003l.pfb' error/annotate.c/RenderFreetype/1120. Magick: unable to read font ` ghostscript_font_path n019003l.pfb' error/annotate.c/RenderFreetype/1120. dmagick.Exception.XServerError dmagick\Image.d(1142): Magick: unable to open X server `' error/display.c/DisplayImages/1662 ---------------- 4C004C 451F2B 40CCF0 415E4C 415E90 415A87 52F2C5 ---------------- I guess displaying is only possible via X server? Otherwise I guess I could fetch the raw bytes of the image and display that via GDI/etc. I've seen a toBlob function in there somewhere, maybe I can use that. I've never used this lib before but it will definitely come in handy. Thanks for your hard work, Mike!
Nov 02 2011
On 11/03/2011 01:42 AM, Andrej Mitrovic wrote:sigmoidalContrast.d works, although draw.d doesn't: Magick: unable to read font ` ghostscript_font_path n019003l.pfb' error/annotate.c/RenderFreetype/1120. Magick: unable to read font ` ghostscript_font_path n019003l.pfb' error/annotate.c/RenderFreetype/1120. dmagick.Exception.XServerError dmagick\Image.d(1142): Magick: unable to open X server `' error/display.c/DisplayImages/1662 ---------------- 4C004C 451F2B 40CCF0 415E4C 415E90 415A87 52F2C5 ---------------- I guess displaying is only possible via X server? Otherwise I guess I could fetch the raw bytes of the image and display that via GDI/etc. I've seen a toBlob function in there somewhere, maybe I can use that. I've never used this lib before but it will definitely come in handy. Thanks for your hard work, Mike!If you get displaying with GDI working it might be worth adding it to DMagick, so that every windows user can display images easily. -- Mike Wey
Nov 03 2011
On 11/3/11, Mike Wey <mike-wey example.com> wrote:If you get displaying with GDI working it might be worth adding it to DMagick, so that every windows user can display images easily.Yeah it is working, but I'll refactor it a little bit to make it more generic and to avoid buffer reallocations in the code. If you put your project on github I could make a pull, otherwise we can use your webby.
Nov 03 2011
On 11/03/2011 10:22 PM, Andrej Mitrovic wrote:On 11/3/11, Mike Wey<mike-wey example.com> wrote:https://github.com/MikeWey/DMagick -- Mike WeyIf you get displaying with GDI working it might be worth adding it to DMagick, so that every windows user can display images easily.Yeah it is working, but I'll refactor it a little bit to make it more generic and to avoid buffer reallocations in the code. If you put your project on github I could make a pull, otherwise we can use your webby.
Nov 04 2011
On 11/4/11, Mike Wey <mike-wey example.com> wrote:On 11/03/2011 10:22 PM, Andrej Mitrovic wrote:Sweet! Btw, your copydll.bat script calls a "where" utility but I can't figure out where to download it (pardon the pun). I have a custom 'where' batch script from before but it doesn't work with copydll.bat.On 11/3/11, Mike Wey<mike-wey example.com> wrote:https://github.com/MikeWey/DMagickIf you get displaying with GDI working it might be worth adding it to DMagick, so that every windows user can display images easily.Yeah it is working, but I'll refactor it a little bit to make it more generic and to avoid buffer reallocations in the code. If you put your project on github I could make a pull, otherwise we can use your webby.
Nov 04 2011
On 11/04/2011 08:15 PM, Andrej Mitrovic wrote:On 11/4/11, Mike Wey<mike-wey example.com> wrote:I look like where is only included in recent Windows versions. I've changed the script so that it should also work on older Windows versions. -- Mike WeyOn 11/03/2011 10:22 PM, Andrej Mitrovic wrote:Sweet! Btw, your copydll.bat script calls a "where" utility but I can't figure out where to download it (pardon the pun). I have a custom 'where' batch script from before but it doesn't work with copydll.bat.On 11/3/11, Mike Wey<mike-wey example.com> wrote:https://github.com/MikeWey/DMagickIf you get displaying with GDI working it might be worth adding it to DMagick, so that every windows user can display images easily.Yeah it is working, but I'll refactor it a little bit to make it more generic and to avoid buffer reallocations in the code. If you put your project on github I could make a pull, otherwise we can use your webby.
Nov 04 2011
Thanks for DMagick... works great, except toBlob(). When I try the following: Image example = new Image(Geometry(100, 100), new ColorRGB(0, 255, 0)); example.toBlob(); I get an access violation. Do I anything wrong or is it a bug? (I'm using Imagick 6.7.6, DMD64 and CentOS)
Apr 08 2012
On 04/08/2012 06:19 PM, nrgyzer wrote:Thanks for DMagick... works great, except toBlob(). When I try the following: Image example = new Image(Geometry(100, 100), new ColorRGB(0, 255, 0)); example.toBlob(); I get an access violation. Do I anything wrong or is it a bug? (I'm using Imagick 6.7.6, DMD64 and CentOS)It's a bug. -- Mike Wey
Apr 09 2012
On 04/09/2012 01:37 PM, Mike Wey wrote:On 04/08/2012 06:19 PM, nrgyzer wrote:And fixed, but you will need to set Image.magick or pass it to toBlob to tell Imagemagick what kind of blob you want. -- Mike WeyThanks for DMagick... works great, except toBlob(). When I try the following: Image example = new Image(Geometry(100, 100), new ColorRGB(0, 255, 0)); example.toBlob(); I get an access violation. Do I anything wrong or is it a bug? (I'm using Imagick 6.7.6, DMD64 and CentOS)It's a bug.
Apr 09 2012
Btw, with warnings turned on I get: ..\dmagick\Image.d(236): Warning: overrides base class function object.Object.toString, but is not marked with 'override'
Nov 02 2011
It would be easier not having to register on a custom website just to issue reports. But anyway this line triggers a runtime exception: Line 256, dmagick/Image.d: result ~= std.string.format("%sx%s%+ld%+ld ", imageRef.page.width, imageRef.page.height, imageRef.page.x, imageRef.page.y); std.format.FormatException std\format.d(4094): formatArg Personally, it's because of issues like this I never use any other specifier but %s. It's hard to track this down with no line numbers, and that exception message that points to internal code is completely useless. Ah, phobos...
Nov 02 2011
On 11/03/2011 02:31 AM, Andrej Mitrovic wrote:It would be easier not having to register on a custom website just to issue reports. But anyway this line triggers a runtime exception:I've thought about moving to Github, maybe i should finally look take the time to set things up. -- Mike Wey
Nov 03 2011
I was trying to export pixels: auto pixels = image.exportPixels!byte(area, "RGB"); But got: ..\dmagick\Image.d(1340): Error: cannot implicitly convert expression (pixels) of type void[] to byte[] I think you might need to change Line 1340, dmagick/Image.d: return pixels; to this: return cast(typeof(return))pixels; Still, with this change I get an access violation in the statement before it that calls ExportImagePixels. Ddbg says: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION(0xc0000005) at CORE_RL_magick_.dll (0x100c1267) thread(3440) These were my calls: Image image = new Image("newbitmap.bmp"); int x, y; auto area = Geometry(100, 100, x, y); auto pixels = image.exportPixels!byte(area, "RGB"); newbitmap.bmp is a 614x768x8bit bitmap.
Nov 02 2011
On 11/3/11, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:Unhandled Exception: EXCEPTION_ACCESS_VIOLATION(0xc0000005) at CORE_RL_magick_.dll (0x100c1267) thread(3440)I think I've found the issue: void[] pixels = new T[area.width*area.height]; Here you're allocating width*height, but you didn't take into account that each exported channel specified by map will need more width*height storage. Here's what I did to fix it: import std.utf; auto pixels = new T[]((area.width * area.height) * map.count); // call ExportImagePixels return pixels; I think the DLL tried to write to memory beyond what the GC allocated for the array, and hence the access violation.
Nov 02 2011
Ok I'll stop spamming here and report on your site, here's issue 1: http://code.mikewey.eu/p/DMagick/issues/1/
Nov 02 2011
I've started a new repo where I'll be writing some DMagick (win32) sample apps. I have a simple one now that loads an image to a DibSection and blits it to the screen: https://github.com/AndrejMitrovic/DMagickSamples Note that I've had to add a couple of fixes to the library, so I'm distributing it with the samples.
Nov 03 2011
On 11/03/2011 06:43 PM, Andrej Mitrovic wrote:I've started a new repo where I'll be writing some DMagick (win32) sample apps. I have a simple one now that loads an image to a DibSection and blits it to the screen: https://github.com/AndrejMitrovic/DMagickSamples Note that I've had to add a couple of fixes to the library, so I'm distributing it with the samples.I've merged in the the fixes you added. I see that you have removed the shared static this from Image.d, is initializing ImageMagick unnecessary on Windows? I've never tested without initializing though. -- Mike Wey
Nov 03 2011
On 11/3/11, Mike Wey <mike-wey example.com> wrote:I've merged in the the fixes you added. I see that you have removed the shared static this from Image.d, is initializing ImageMagick unnecessary on Windows?Well it causes access violations on application start like I've mentioned in the bug report. Without the calls the violations are gone and I can use ImageMagick, for now nothing seems to be wrong when I don't call those init functions.
Nov 03 2011
it is a great project, i know it is kind of looking like an <a href="http://www.rasteredge.com/how-to/vb-net-imaging/imaging-processing/">image processing tool vb</a> for user. the interface looks cool. keep up with the work.
Jun 19 2013