diff options
Diffstat (limited to 'dmagick')
| -rw-r--r-- | dmagick/Image.d | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dmagick/Image.d b/dmagick/Image.d index ea74403..d1e7205 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -2968,6 +2968,10 @@ class Image if ( depth != 0 ) this.depth = depth; + string originalFilename = filename; + filename = this.magick ~ ":"; + scope(exit) filename = originalFilename; + void* blob = ImageToBlob(options.imageInfo, imageRef, &length, exceptionInfo); DMagickException.throwException(exceptionInfo); @@ -2978,6 +2982,12 @@ class Image return dBlob; } + unittest + { + Image example = new Image(Geometry(100, 100), new Color("green")); + example.toBlob("jpg"); + } + /** * Changes the opacity value of all the pixels that match color to * the value specified by opacity. By default the pixel must match @@ -3718,7 +3728,7 @@ class Image ///ditto string filename() const { - return to!(string)(imageRef.filename); + return imageRef.magick[0 .. strlen(imageRef.magick.ptr)].idup; } /** |
