Commit Graph

76 Commits

Author SHA1 Message Date
Nat Quayle Nelson
15a2fd7d1a Making self mutable 2018-05-25 16:49:38 -04:00
Nat Quayle Nelson
3daa8e77e8 adding docs & rotate_image 2018-05-25 16:39:59 -04:00
Nat Quayle Nelson
ccda94221f Adding binding for MagickAddImage 2018-05-25 16:00:40 -04:00
Błażej Święcicki
88ceb3a4af Add set_image_alpha_channel function 2018-05-18 13:51:50 +00:00
Błażej Święcicki
631725121a Add reset_image_page function. 2018-05-18 13:51:50 +00:00
Błażej Święcicki
b47d2e64c5 Add ping_image and ping_image_blob functions. 2018-05-18 13:51:50 +00:00
Błażej Święcicki
1f4a586426 More MagickWand functions wrapped. 2018-03-29 11:12:09 +02:00
Błażej Święcicki
7b4cca3956 MagickCropImage returns a result, and so should crop_image 2018-03-29 11:12:09 +02:00
Błażej Święcicki
07dd10f9cb Fix memory management in string_get! 2018-03-29 11:12:09 +02:00
Sindre Ilebekk Johansen
d5fe6f95cf Fix exporting pdf->jpeg for multi-page pdf
When trying to convert a multi-page pdf to jpeg i got a pdf file
instead of a jpeg file. I figured that the pdf that worked was
a one-page pdf and the pdf that did not work was a two-page pdf.

My theory was that the two pages was loaded as to images in the
wand and that the format was set on the first page and it exported
the second page. And since the second page had the old format, it
was exported as a pdf.

Resetting the page iterator before exporting the image fixed the
bug, and the multi-page pdf was exported as a jpeg. The image that
was exported was just the first page, but it works for my usage.
2018-03-27 15:47:54 +02:00
Sindre Johansen
f397e65634 Add crop_image to MagickWand 2018-02-14 12:44:00 +01:00
little-bobby-tables
f2b153c987 add color-related getters and mutations 2018-01-03 17:04:45 +07:00
Nathan Fiedler
06f1a4352a Merge branch 'magick-7' 2017-08-26 13:14:51 -07:00
little-bobby-tables
f6c55ba836 add get_image_page to MagickWand
get_image_page (MagickGetImagePage) is especially useful
for determining the overall dimensions of a GIF, which may have
frames with different widths and heights. In such cases,
get_image_width and get_image_height report the dimensions of
the last frame only.
2017-08-23 19:37:38 +07:00
Nathan Fiedler
2d63b00b1f Fix typo in doc comment 2017-08-19 17:45:06 -07:00
little-bobby-tables
7abde0e7c6 resolve initial compilation issues 2017-08-19 16:35:58 +07:00
gentoo90
c50b3e27de Add compare_images method 2017-05-16 16:43:08 +03:00
Nathan Fiedler
e7054d3e35 Use the rust-bindgen crate properly
Using the changes from @gadomski along with some additional work, to get the
generated bindings working again. Works on macOS and FreeBSD 11. A couple of
hacks are needed for FreeBSD, but nothing too serious.

Changed to use the libc prefix, and changed to use the generated enums.

Fixes #22, #15, and #14

cargo test passes
2017-04-08 16:03:58 -07:00
Nathan Fiedler
2c94dab05a Add license header to contributed files 2016-08-14 18:46:03 -07:00
Nathan Fiedler
7a5bd98746 Merge pull request #13 from gadomski/set-option
Add `set_option` method.
2016-08-03 20:34:21 -07:00
Pete Gadomski
eeb014af1f Add set_option method.
This is useful for stuff like setting the loop option for a gif.
2016-08-02 12:01:34 -06:00
Pete Gadomski
b46f8a47ac Add write_images_blob
This method goes down to `MagickGetImagesBlob`, which allows for
creating animated gifs.

I didn't abstract out common operations between the two in the interest
of not overly polluting the codebase. However, this new method is almost
identical to `write_image_blob` so you could probably abstract something
out of there.
2016-08-02 11:35:16 -06:00
Herman J. Radtke III
1b2d7010af Change MagickWand::read_image_blob to use ref
Breaking change.

The `read_image_blob` function does not need to take ownership of the
image byte array.
2016-06-25 09:47:09 -07:00
Mattis Marjak
9d2eba64a3 use size_t and ssize_t types for cross-compilation 2016-05-16 19:03:45 +03:00
Mattis Marjak
9e2285a4aa add drawing and pixel wands; add some methods to MagickWand 2016-05-11 22:12:42 +03:00
Mattis Marjak
4c7cebe628 move MagickWand to wand/magick.rs and filters to filters.rs 2016-05-11 17:03:53 +03:00