Commit Graph

236 Commits

Author SHA1 Message Date
Nathan Fiedler
acabbafa08 Downgrade rust-bindgen to 0.25.5
There is an issue when building on Linux when using 0.26.0 or higher, so
keep to a version that still works on Mac and Linux.

cargo test passes
2017-07-08 21:30:42 -07:00
Nathan Fiedler
979cdd3269 Fix Ubuntu 16 test VM, rename directory
Also remove the FreeBSD VM definition, as it basically does not work in
VirtualBox and Vagrant, for whatever reason.
2017-07-08 21:29:04 -07:00
Nathan Fiedler
1436145cb5 Tag new release with small API addition
Also, update bindgen version and format some of the comments and
documentation.

cargo test passes
2017-07-07 20:38:01 -07:00
Nathan Fiedler
cba0de65fa Merge pull request #25 from gentoo90/compare
Add `compare_images` method
2017-05-16 10:08:58 -07:00
gentoo90
c50b3e27de Add compare_images method 2017-05-16 16:43:08 +03:00
Nathan Fiedler
4a5b6935ed Merge pull request #24 from gadomski/split-pkg-config-version-flags
Split the pkg-config version and flags checks
2017-04-10 11:23:28 -07:00
Pete Gadomski
d39972da88 Split the pkg-config version and flags checks
Apparently, on RHEL 6.7, pkg-config doesn't let you check versions and
output flags in the same command run.
2017-04-10 08:13:36 -06:00
Nathan Fiedler
00749a2d3d Forgot to set package version 2017-04-08 21:07:20 -07:00
Nathan Fiedler
034a7313bf Update CHANGELOG, add bindgen link to README 2017-04-08 20:58:20 -07: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
Pete Gadomski
4507d07c9c Update to the bingen crate 2017-04-07 06:24:00 -06:00
Nathan Fiedler
d86bf69079 Strike out bindgen in README file 2017-04-06 20:02:54 -07:00
Nathan Fiedler
b22e97c908 Hack the MagickWand bindings
Using rust-bindgen to generate the bindings for the MagickWand library is
extremely difficult with the new versions of rust-bindgen. The old versions
of the generated bindings will be used for now, and nothing will be
generated at build time.

cargo test passes
2017-04-06 19:58:58 -07:00
Nathan Fiedler
f4843c246c Test with some flexibility in image size
The size of the image can vary from version to version (of ImageMagick) and
platform to platform (i.e. MacOS and FreeBSD). As such, allow for a degree
of variability in the resulting image size.

cargo test passes
2017-01-22 14:13:05 -08:00
Nathan Fiedler
6ade7438d9 Additional Homebrew link command is needed 2017-01-21 15:30:37 -08:00
Nathan Fiedler
693dc0b4e9 Specify exactly how to install ImageMagick with Homebrew 2017-01-21 13:18:22 -08:00
Nathan Fiedler
c45a066093 Quiet the package installation in Fabric script 2016-10-20 09:02:13 -07:00
Nathan Fiedler
2eccf1e91b Ensure pkg-config present when generating bindings
Not all systems have pkg-config installed by default.

cargo test passes
2016-10-20 08:51:25 -07:00
Nathan Fiedler
b63f25c550 Enforce MagickWand version in build.rs
It is very easy to overlook the version of MagickWand mentioned in the
README, so make sure the build system enforces it.

Fixes #19

cargo test passes
2016-10-16 11:00:06 -07:00
Nathan Fiedler
cb40925af0 Merge pull request #18 from brunoqc/patch-1
syntax highlighting in README.md
2016-10-05 09:39:53 -07:00
Bruno Bigras
1d31b971c6 syntax highlighting in README.md 2016-10-04 17:01:27 -04:00
Nathan Fiedler
50d10a3285 Add notes for 0.6.0 release 2016-09-20 20:11:49 -07:00
Nathan Fiedler
dd4becddd7 Hack to get build working on FreeBSD again
Due to a bug in rust-bindgen, use the bindings as generated on the Mac
for the same version of MagickWand as found on FreeBSD. That is, when
build.rs is invoked on a FreeBSD system, it will use the Mac-generated
bindings.rs rather than pulling down rust-bindgen and invoking it to
generate the bindings on the fly. See issue #385 in the rust-bindgen
project for details.

cargo test passes
2016-09-20 20:03:28 -07:00
Nathan Fiedler
2a76a0f164 Merge pull request #17 from gadomski/remove-usr-local-lib-link-path
Remove /usr/local/lib from rustc link search on OSX
2016-08-25 08:52:32 -07:00
Pete Gadomski
7563231707 Remove /usr/local/lib from rustc link search
If /usr/local/lib is in the search path, a Homebrew installed libJPEG
can end up conflicting with the system libJPEG as such:

```
$ otool -L /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO:
... snip ...
    /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib (compatibility version 1.0.0, current version 1.0.0)
... snip ...
```

```
$ cargo clean && cargo test
... snip ...
Doc-tests magick_rust
dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
```

Removing the /usr/local/lib link search path allows successful
compilation and testing on my OSX 10.11.6, with jpeg 8d installed into
/usr/local/lib via Homebrew. I realize this might be a problem with my
setup and not a universal issue, but as Homebrew is so common I thought
I'd submit this patch anyways.
2016-08-25 07:54:49 -06:00
Nathan Fiedler
094e24d859 Clarify versions of dependencies 2016-08-18 15:53:14 -07:00
Nathan Fiedler
39a58432b7 Include note about LIBCLANG_PATH envar for Linux 2016-08-18 15:47:35 -07:00
Nathan Fiedler
b0d439892b Correct the copyright year 2016-08-18 15:47:14 -07:00
Nathan Fiedler
8b8f2b4444 Update Fabric script for provisioning Ubuntu VM 2016-08-18 14:59:04 -07:00
Nathan Fiedler
5b4ba71530 Make note that Clang is required to build 2016-08-18 14:58:45 -07:00
Nathan Fiedler
eec7998d25 Use new rust-bindgen crate for faster builds
Rather than cloning the bindgen repository and building from source, use
the packaged crate. The result is the rebuilds are much, much faster.
Also, had to make numerous changes for the new version of bindgen.

cargo test passes
2016-08-14 21:23:05 -07:00
Nathan Fiedler
2c94dab05a Add license header to contributed files 2016-08-14 18:46:03 -07:00
Nathan Fiedler
f41202af44 No longer need to ignore bindings.rs 2016-08-12 20:32:07 -07:00
Nathan Fiedler
a3a02fc6d9 Add changes from recent merge requests 2016-08-03 20:39:26 -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
Nathan Fiedler
76e4abb862 Merge pull request #12 from gadomski/write-images-blob
Add `write_images_blob`
2016-08-03 20:31:15 -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
Nathan Fiedler
1dcd0f6933 Fix crate version number
cargo test passes
2016-07-17 18:09:09 -07:00
Nathan Fiedler
95c6d58789 Correct the crate version number 2016-07-17 17:48:55 -07:00
Nathan Fiedler
96071ca377 Use Result.expect() in the suitable cases 2016-07-14 19:12:27 -07:00
Nathan Fiedler
dff74fac98 Use 6.9 version of ImageMagick for Ubuntu VM 2016-07-14 17:48:54 -07:00
Nathan Fiedler
f60f612baf Update changelog to reflect API change 2016-06-25 15:42:39 -07:00
Nathan Fiedler
731025764d Fix the tests after the API change 2016-06-25 15:39:36 -07:00
Nathan Fiedler
391c84a014 Merge pull request #10 from hjr3/read_image_blob-as_ref
Change MagickWand::read_image_blob to use ref
2016-06-25 15:29:07 -07: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
Nathan Fiedler
40ebf0fbf7 Merge pull request #7 from hjr3/patch-1
Update required version to 6.9
2016-06-18 15:25:41 -07:00
Herman J. Radtke III
eedab4a6a7 Update required version to 6.9
This library makes use of `MagickAutoOrientImage`, which is not present in all versions of ImageMagick 6.
2016-06-17 19:00:31 -07:00
Nathan Fiedler
f9521106b5 Update the changelog for latest changes 2016-05-18 06:50:27 -07:00
Nathan Fiedler
b20c99ecb8 Merge pull request #5 from marjakm/master
add drawing and pixel wands; add some methods to MagickWand
2016-05-18 06:43:53 -07:00