parent
6459045aef
commit
354323ea73
@ -1,157 +0,0 @@
|
||||
These active developers and have made source code contributions to the
|
||||
ImageMagick project in the last few years:
|
||||
|
||||
Cristy
|
||||
Principal architect of ImageMagick and still maintains the ImageMagick
|
||||
distribution.
|
||||
|
||||
Dirk Lemstra
|
||||
Contributor to and maintainer of Magick++, OpenCL acceleration, and
|
||||
the Windows build (configure, ImageMagickObject, etc.).
|
||||
|
||||
Bastien ROUCARIÈS
|
||||
Various patches from Debian downstream.
|
||||
|
||||
Fred Weinhaus
|
||||
Contributed support and documentation for the discrete Fourier transform,
|
||||
connected component labeling, perceptual hash, kuwahara filter and others.
|
||||
Also provides scripts that perform some out-of-the ordinary image
|
||||
processing operations @ http://www.fmwconcepts.com/imagemagick/. He
|
||||
utilized his scripts as unit tests for ImageMagick version 7 to ensure
|
||||
version 6 compatibility before its release.
|
||||
|
||||
|
||||
These individuals have made source code contributions to the ImageMagick
|
||||
project in the past but are no longer active developers:
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
Contributed significantly to the utilities. Authored support for JNG,
|
||||
MNG, and PNG formats. Provided significant support for the BMP format.
|
||||
Made significant improvements to the documentation.
|
||||
|
||||
Kelly Bergougnoux
|
||||
Authored the Cineon image coder (based on the existing DPX source).
|
||||
|
||||
Nathan Brown
|
||||
Original author of the JP2 coder.
|
||||
|
||||
Siu Chi Chan
|
||||
Accelerate numerous image filters with OpenCL under AMD, Intel,
|
||||
and NVidia. Adapted from MulticoreWare OpenCL contribution.
|
||||
|
||||
Mike Chiarappa
|
||||
Created a Borland C++ Builder 6.0 build environment for ImageMagick.
|
||||
|
||||
Troy Edwards
|
||||
Authored the source RPM spec file for ImageMagick.
|
||||
|
||||
Jaroslav Fojtik
|
||||
Authored the CUT, ART, and MATLAB coder modules.
|
||||
|
||||
Francis J. Franklin
|
||||
Ported the WMF coder to the libwmf 0.2 API.
|
||||
|
||||
Markus Friedl
|
||||
Original author of Base64 encode/decode sources.
|
||||
|
||||
Bob Friesenhahn
|
||||
Author of Magick++ (C++ API to ImageMagick). Author of module loader
|
||||
facility, automatic file identification (magic) support, Unix/Cygwin/MinGW
|
||||
configure/make facility, Windows setup.exe style installer, WMF renderer,
|
||||
C API documentation formatter, and the C, C++, and Perl test suites
|
||||
used by ImageMagick.
|
||||
|
||||
David Harr
|
||||
Contributed (with Leonard Rosenthol) dash pattern, linecap stroking
|
||||
algorithm, and minor rendering improvements.
|
||||
|
||||
Christopher R. Hawks
|
||||
Authored the PALM coder.
|
||||
|
||||
Rick Mabry
|
||||
Contributed code to support filling drawn objects using a pattern image
|
||||
and major improvements to the web page (both content and appearance).
|
||||
|
||||
Catalin Mihaila
|
||||
Contributed a ZX-Spectrum SCREEN$ reader.
|
||||
|
||||
Chantal Racette, Laurentian University
|
||||
Sped up Sinc and Blackman filter kernels. EWA resampling code
|
||||
verification.
|
||||
|
||||
William Radcliffe
|
||||
Author of the VisualMagick project configure facility for Visual C++.
|
||||
Author of FlashPix module. Author of the EMF, and META coders.
|
||||
Significant contributions to the MSL, JPEG, TIFF, SVG, and URL coders.
|
||||
Authored "process" module support. Wrote the micro-timer facility used
|
||||
by 'identify'. Ported module loader support to Windows. Significantly
|
||||
improved polygon rendering performance.
|
||||
|
||||
Nicolas Robidoux, Laurentian University
|
||||
New ellipse clamping method and vertical/horizontal line preserving
|
||||
filters for EWA resampling. Sped up resampling filter kernels.
|
||||
|
||||
Leonard Rosenthol
|
||||
Authored the 'conjure' utility and associated MSL execution environment.
|
||||
Provided MacOS support. Authored the CLIPBOARD, XCF, and PSD coders.
|
||||
Postscript and PDF expertise. Significant drawing enhancements including
|
||||
support for dash patterns, linecap stroking, clipping masks and a
|
||||
mask image.
|
||||
|
||||
Kyle Shorter
|
||||
Original author of PerlMagick. Author of the LOCALE coder.
|
||||
|
||||
Lars Ruben Skyum
|
||||
Contributed the -clippath functionality, improved color profile support,
|
||||
and re-wrote the PS3 coder.
|
||||
|
||||
Anthony Thyssen
|
||||
Designed the ImageMagick 6.0 command line processing with parenthesis,
|
||||
image sequence operators, and GIF animation processing. Wrote the
|
||||
image perspective distortions (-distort) and resampling methods.
|
||||
Maintains a comprehensive set of examples of using ImageMagick at
|
||||
https://legacy.imagemagick.org/Usage/.
|
||||
|
||||
Milan Votava
|
||||
Contributed support for Wireless BitMap, used in WAP - Wireless Access
|
||||
Protocol.
|
||||
|
||||
|
||||
We acknowledge these non-developer contributors to the ImageMagick project:
|
||||
|
||||
Rod Bogart and John W. Peterson, University of Utah
|
||||
Image compositing is loosely based on rlecomp of the Utah Raster Toolkit.
|
||||
|
||||
Hanno Böck
|
||||
Contributed numerous fuzzed-images that revealed program flaws in
|
||||
ImageMagick. Additional checks were added to guard against nefarious
|
||||
image files.
|
||||
|
||||
Thomas R Crimmins
|
||||
Inventor of the eight hull algorithm used for speckle reduction.
|
||||
|
||||
Michael Halle, Spatial Imaging Group at MIT
|
||||
Contributed the initial implementation of Alan Paeth's image rotation
|
||||
algorithm.
|
||||
|
||||
Paul Heckbert, Carnegie Mellon University
|
||||
Image resizing is loosely based on Paul Heckbert's Zoom program.
|
||||
|
||||
Peder Langlo, Hewlett Packard
|
||||
Made hundreds of suggestions and bug reports. Without Peder, this
|
||||
software would not be nearly as useful as it is today.
|
||||
|
||||
David Pensak, E. I. du Pont de Nemours and Company
|
||||
For providing the computing environment that made developing ImageMagick
|
||||
possible.
|
||||
|
||||
Paul Raveling, USC Information Sciences Institute
|
||||
The spatial subdivision color reduction algorithm is based on his
|
||||
Img software.
|
||||
|
||||
Alvy Ray Smith and Eric Ray Lyons
|
||||
HWB color transform and algorithm.
|
||||
|
||||
Alexander Zimmermann
|
||||
Responsible for the ImageMagick Linux binary distributions for many years.
|
||||
His efforts are very much appreciated.
|
@ -1,904 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [6.9.12-43](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-42...6.9.12-43) - 2022-03-20
|
||||
|
||||
### Commits
|
||||
|
||||
- magick: support getentropy() [`d29a057`](https://github.com/ImageMagick/ImageMagick6/commit/d29a057a3689f7b944b879dee92e7d39a33bf3cc)
|
||||
- ... [`96d197f`](https://github.com/ImageMagick/ImageMagick6/commit/96d197f14932d4ba8a116e06fe306403ea1e32f1)
|
||||
- Coders: eliminate compiler warnings [`ee332c5`](https://github.com/ImageMagick/ImageMagick6/commit/ee332c511445a1fb2934f40246c3c958aefd73e9)
|
||||
- Pull request: https://github.com/ImageMagick/ImageMagick/pull/4963 [`450949e`](https://github.com/ImageMagick/ImageMagick6/commit/450949ed017f009b399c937cf362f0058eacc5fa)
|
||||
- Coders: https://github.com/ImageMagick/ImageMagick/issues/4947 [`78f03b6`](https://github.com/ImageMagick/ImageMagick6/commit/78f03b619d08d7c2e0fcaccab407e3ac93c2ee8f)
|
||||
- Coders: PS and EPS %%BoundingBox not being parsed #4961 [`2a67214`](https://github.com/ImageMagick/ImageMagick6/commit/2a67214abc2410931064b1f4e2c01f177d768edf)
|
||||
- Changed the format of MAGICK_GIT_REVISION and use this in -version. [`bd49573`](https://github.com/ImageMagick/ImageMagick6/commit/bd495730646575af3c867ed09adc8588061079ab)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4927 [`932cf02`](https://github.com/ImageMagick/ImageMagick6/commit/932cf023db383394c4ec304c95730aed631c57d2)
|
||||
- Coders: proper check for out of bounds per https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45640 [`5468786`](https://github.com/ImageMagick/ImageMagick6/commit/5468786406b323fef6a5fe50bc56dabde3da4130)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4927 [`594366f`](https://github.com/ImageMagick/ImageMagick6/commit/594366fd3a5268d0456c4f60c5746a9f586ab035)
|
||||
- correct date format [`625ff11`](https://github.com/ImageMagick/ImageMagick6/commit/625ff113cc9acf864c56c266471829bb19439299)
|
||||
- getentropy() requires sys/random.h include [`005bac2`](https://github.com/ImageMagick/ImageMagick6/commit/005bac2904c18bc6f03a2ac31bdda51005411355)
|
||||
- no need to check for < 0 [`dead6a8`](https://github.com/ImageMagick/ImageMagick6/commit/dead6a806786eb2712dd76c38e3ff75c2f94997b)
|
||||
- Coders: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42549 [`de6ada9`](https://github.com/ImageMagick/ImageMagick6/commit/de6ada9a068b01494bfb848024ed46942da9d238)
|
||||
- build: release [`2d5e8e3`](https://github.com/ImageMagick/ImageMagick6/commit/2d5e8e387e1c6daaf45f8efd1c24ee6a53e70e01)
|
||||
- build: pending release [`775c781`](https://github.com/ImageMagick/ImageMagick6/commit/775c7817f3700514173e0655776e0d9465e93d6c)
|
||||
|
||||
## [6.9.12-42](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-41...6.9.12-42) - 2022-03-04
|
||||
|
||||
### Commits
|
||||
|
||||
- auto-generate the change log from git commit [`553ca1b`](https://github.com/ImageMagick/ImageMagick6/commit/553ca1b6e5bcc7d89af226cecfa6b6197a90a98c)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4876 [`52e5cc1`](https://github.com/ImageMagick/ImageMagick6/commit/52e5cc1988b15b9a6f3d7e9e3b7b72e3a346cfc9)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/966 [`d9544e7`](https://github.com/ImageMagick/ImageMagick6/commit/d9544e78bfe55361b7768ddb00eb24b7f33f2137)
|
||||
- ... [`8f1f6c3`](https://github.com/ImageMagick/ImageMagick6/commit/8f1f6c32bfb13ac1e8b8a7ce2f59a28ef06cb18b)
|
||||
- pending release [`4f420a4`](https://github.com/ImageMagick/ImageMagick6/commit/4f420a43ce112948baa8de9a1ba56ee7b17afb0f)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4870 [`8b7b17c`](https://github.com/ImageMagick/ImageMagick6/commit/8b7b17c8fef72dab479e6ca676676d8c5e395dd6)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/966 [`2db42a9`](https://github.com/ImageMagick/ImageMagick6/commit/2db42a9e1dde7e88dc370deb04a3be48c01dedf5)
|
||||
- escape \n character [`32a4bf3`](https://github.com/ImageMagick/ImageMagick6/commit/32a4bf395e8201896c0a21f95661766bed41e470)
|
||||
- throw exception on reserved filename character (\xff) [`8215fc2`](https://github.com/ImageMagick/ImageMagick6/commit/8215fc2e71513877d3040fbddfd1f16ca54499a7)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4888 [`2eb8b86`](https://github.com/ImageMagick/ImageMagick6/commit/2eb8b8660dac0d647a7045a6af7f3e8fcca1d8f8)
|
||||
- ... [`4c2da37`](https://github.com/ImageMagick/ImageMagick6/commit/4c2da37f2bcc98059f44cecf304e8b3c53664bfd)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4888 [`ba2242d`](https://github.com/ImageMagick/ImageMagick6/commit/ba2242da46bfbd2cc4890486ff147a0113e08735)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/966 [`bb79523`](https://github.com/ImageMagick/ImageMagick6/commit/bb795235696e2ace0f3d0b5703065a4b9a882f04)
|
||||
- canonical copyright notice [`1e5a283`](https://github.com/ImageMagick/ImageMagick6/commit/1e5a28310d73e9c8c29fad113c872351340595a3)
|
||||
- Changed trigger for release. [`552bddd`](https://github.com/ImageMagick/ImageMagick6/commit/552bddd79749d8195cf5a1871929076adf9a479e)
|
||||
- ChangeLog => ChangeLog.md [`8a6726a`](https://github.com/ImageMagick/ImageMagick6/commit/8a6726af81ac40b41e962cafa8fd014d2659d432)
|
||||
- pending release [`dad876f`](https://github.com/ImageMagick/ImageMagick6/commit/dad876ff6b5e873bc59e0661d40e157eb599fcc1)
|
||||
- Fixed memory leak in ThumbnailImage. [`161f49b`](https://github.com/ImageMagick/ImageMagick6/commit/161f49b3b6a7d3121a566654f12916700d7f2d07)
|
||||
|
||||
## [6.9.12-41](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-40...6.9.12-41) - 2022-02-21
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`757c88c`](https://github.com/ImageMagick/ImageMagick6/commit/757c88cfe941df0cff8f2fef4681bd2b665c091c)
|
||||
- Removed the xtrn coder. [`768f648`](https://github.com/ImageMagick/ImageMagick6/commit/768f648cce36a641b54092d78117435996c74a9a)
|
||||
- rename method to TLS-moniker, thread local storage [`8860c28`](https://github.com/ImageMagick/ImageMagick6/commit/8860c28c64ae2cf5717e309325592c1ccb7cb969)
|
||||
- Removed NTGhostscriptDLL and NTGhostscriptLoadDLL from the private header. [`70b7dfa`](https://github.com/ImageMagick/ImageMagick6/commit/70b7dfaf4d2f75af8b649d542d49374d6f447c11)
|
||||
- remove reference to ImageMagickObject [`d64a152`](https://github.com/ImageMagick/ImageMagick6/commit/d64a15289a17a9d1d9856758f2ba82b75325f370)
|
||||
- Fixes for installation in a folder that contains non ASCII characters. [`e3d32a2`](https://github.com/ImageMagick/ImageMagick6/commit/e3d32a2bdb9e50ddb2fd5966c847f0726e128815)
|
||||
- ... [`695af8d`](https://github.com/ImageMagick/ImageMagick6/commit/695af8d4be0d25b36129d7b3fdf5a1b991216784)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4843 [`b24793c`](https://github.com/ImageMagick/ImageMagick6/commit/b24793c396083176cbf019a09847ad3ab427e240)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4761 [`77d68d3`](https://github.com/ImageMagick/ImageMagick6/commit/77d68d3e554ecd0e38ceb6a3f1decf65a69362c5)
|
||||
- don't over-allocate thread-specific data [`b61069a`](https://github.com/ImageMagick/ImageMagick6/commit/b61069a33bab43a022992b3f7c81a50e06a7b45a)
|
||||
- ... [`45d3733`](https://github.com/ImageMagick/ImageMagick6/commit/45d37331ef1a38712740e9bd7090fb855557b7cb)
|
||||
- Removed the xtrn coder. [`854e7be`](https://github.com/ImageMagick/ImageMagick6/commit/854e7be5f0ce94c0a431d49a1c82a9eb50916be4)
|
||||
- cosmetic [`6831beb`](https://github.com/ImageMagick/ImageMagick6/commit/6831bebd3067bddc10e954fe09bc98a3e6947be7)
|
||||
- fix compiler exception under Cygwin [`32315c9`](https://github.com/ImageMagick/ImageMagick6/commit/32315c92a4e31c0b75fb88548c0bf40242f0e5f1)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4867 [`8c1bf89`](https://github.com/ImageMagick/ImageMagick6/commit/8c1bf8917a7a23daa6aaa03bb4293fd9ff7859a2)
|
||||
- remove references to ImageMagickObject [`1e63c5c`](https://github.com/ImageMagick/ImageMagick6/commit/1e63c5c2d7f2c1d5c6aba0e8935ee855656cbb46)
|
||||
- ... [`ba6e51f`](https://github.com/ImageMagick/ImageMagick6/commit/ba6e51f8e3b49c3d5015df5c4d152e07a37007aa)
|
||||
- cosmetic [`c02d827`](https://github.com/ImageMagick/ImageMagick6/commit/c02d827078d59950e19e169ffeb3d988d0e1185c)
|
||||
- pending release [`8a8673a`](https://github.com/ImageMagick/ImageMagick6/commit/8a8673a9bc1a7b915252645f305a65f0c990b491)
|
||||
- pending release [`9b99699`](https://github.com/ImageMagick/ImageMagick6/commit/9b9969944c92ccaf4fa7d34c1c258a794a1e23b9)
|
||||
- pending release [`9ce4eba`](https://github.com/ImageMagick/ImageMagick6/commit/9ce4ebad1337a10bc9d6b74bddd57ad7dc3cde70)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4865 [`e6d7f78`](https://github.com/ImageMagick/ImageMagick6/commit/e6d7f782fc1b6484c52fe7fb987c06559b489726)
|
||||
- pending release [`fd143dc`](https://github.com/ImageMagick/ImageMagick6/commit/fd143dc849b6c191464f40e581b0abe344b6e41e)
|
||||
- Raise exception when image could not be read but no exception was raised. [`3e15c68`](https://github.com/ImageMagick/ImageMagick6/commit/3e15c68efcb1e6383c93e7dfe38ba6c37e614d1b)
|
||||
- off-by-one fix [`d0a2bc4`](https://github.com/ImageMagick/ImageMagick6/commit/d0a2bc44117217a7619d6ade90af0f40d9321c6e)
|
||||
- no need for conditional compile [`d5fe059`](https://github.com/ImageMagick/ImageMagick6/commit/d5fe0590573b15208f302d57e0b1c97a60e3d16d)
|
||||
- pending release [`b855d8e`](https://github.com/ImageMagick/ImageMagick6/commit/b855d8ec0bb360deb7d80a14b5c1a5a1ffc47ee1)
|
||||
- ... [`cecdf6f`](https://github.com/ImageMagick/ImageMagick6/commit/cecdf6f89642589221edc543144d45c5bde71b77)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/4755 [`1e86532`](https://github.com/ImageMagick/ImageMagick6/commit/1e8653229aeea1a6731ca3632bf5963b417312ed)
|
||||
- pending release [`e7418d5`](https://github.com/ImageMagick/ImageMagick6/commit/e7418d54c54b4646505ba95ce6458f352a94debf)
|
||||
- Whitespace. [`b36de79`](https://github.com/ImageMagick/ImageMagick6/commit/b36de79c6cb913f4423f7eb71901d9f07946f573)
|
||||
|
||||
## [6.9.12-40](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-39...6.9.12-40) - 2022-02-15
|
||||
|
||||
### Commits
|
||||
|
||||
- cosmetic [`1da04da`](https://github.com/ImageMagick/ImageMagick6/commit/1da04dabe110e22954b33927567544b33e97b7a7)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4841 [`f5aeb09`](https://github.com/ImageMagick/ImageMagick6/commit/f5aeb0989d9889d85b2d66a106a670386872a8c6)
|
||||
- ... [`4fd78b8`](https://github.com/ImageMagick/ImageMagick6/commit/4fd78b838c09c88ff3acf43a0799a002d2f873cf)
|
||||
- fix unitialized value [`ce4d5cb`](https://github.com/ImageMagick/ImageMagick6/commit/ce4d5cb663cb3d701d63515edbeee561b71eae39)
|
||||
- off-by-one fix [`409d6db`](https://github.com/ImageMagick/ImageMagick6/commit/409d6db86bae76c8f7401dc1c09c4349b8ca8352)
|
||||
- display last debugging character [`e6a76f8`](https://github.com/ImageMagick/ImageMagick6/commit/e6a76f8bfb9a8edfbd4cdc44e79eb080f164cf71)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4837 [`a339e1f`](https://github.com/ImageMagick/ImageMagick6/commit/a339e1f47dd09d1765e971f7e104d34a2e50785c)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4837 [`00e5d3a`](https://github.com/ImageMagick/ImageMagick6/commit/00e5d3a9a033182fcf704e4b1eae9e569fb85244)
|
||||
- off-by-one fix [`e41e298`](https://github.com/ImageMagick/ImageMagick6/commit/e41e29898936ca76b0def5126771733e0954191e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4822 [`5a76293`](https://github.com/ImageMagick/ImageMagick6/commit/5a7629343bb280a1a177818e6e40776c7484d649)
|
||||
- pending release [`3264d72`](https://github.com/ImageMagick/ImageMagick6/commit/3264d72944d6f2df8f80ecb3d837da1431db37a6)
|
||||
- one off when debugging [`cb6374d`](https://github.com/ImageMagick/ImageMagick6/commit/cb6374d6fe7fec6651b1d1dd4ee7ec97c662c610)
|
||||
- revert [`dc25885`](https://github.com/ImageMagick/ImageMagick6/commit/dc25885dfb4d516d6ef58ba77bfc47e8799acfed)
|
||||
- alpha is never zero [`ff04a51`](https://github.com/ImageMagick/ImageMagick6/commit/ff04a51f4f89813c319f157c0aa993f36b944815)
|
||||
|
||||
## [6.9.12-39](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-38...6.9.12-39) - 2022-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
- possible performance optimization [`1e04814`](https://github.com/ImageMagick/ImageMagick6/commit/1e04814e2e28c9a22f082b5c87cc5cf20642ad0d)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/4813 [`666ab9a`](https://github.com/ImageMagick/ImageMagick6/commit/666ab9ad9552fac12f92d2cf53173bea3d848255)
|
||||
- ... [`e5ab86b`](https://github.com/ImageMagick/ImageMagick6/commit/e5ab86b9f52a8452fb00099f29a51763a5b114ff)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4830 [`409d422`](https://github.com/ImageMagick/ImageMagick6/commit/409d42205927c98cbb852ca96e109716f38f04ab)
|
||||
- optimize reading of XPM properties [`cd103b8`](https://github.com/ImageMagick/ImageMagick6/commit/cd103b81ca7814533192f340053b388c6825ec83)
|
||||
- correct copyright year [`99ef124`](https://github.com/ImageMagick/ImageMagick6/commit/99ef124d080560a9df5a0c177a82c3ccc2ca6ca9)
|
||||
- ... [`bcf9658`](https://github.com/ImageMagick/ImageMagick6/commit/bcf9658a637a7c6993c7203382235fd3fabb7015)
|
||||
- cosmetic [`5683607`](https://github.com/ImageMagick/ImageMagick6/commit/56836073a8cc42127b265280dfb0d5dcb4bc915b)
|
||||
- Removed IsAVI check. [`6eb9f96`](https://github.com/ImageMagick/ImageMagick6/commit/6eb9f96e781996b71ead9d25182be0e84bfdb89f)
|
||||
- Corrected UTF-16 big endian encoding. [`71e590e`](https://github.com/ImageMagick/ImageMagick6/commit/71e590ed3885ef5e2d48918809d8a3a8cfefccba)
|
||||
- prevent integer overflow [`a69648d`](https://github.com/ImageMagick/ImageMagick6/commit/a69648d9d3eb9855eeb6089a692c689581d85cff)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4822 [`0977428`](https://github.com/ImageMagick/ImageMagick6/commit/097742836e252be7aba65c00877722f5eae8e851)
|
||||
- ... [`fb8b7d6`](https://github.com/ImageMagick/ImageMagick6/commit/fb8b7d60e6469c38b9c16436a7a472d57d9b8562)
|
||||
- pending release [`002c3d7`](https://github.com/ImageMagick/ImageMagick6/commit/002c3d7c493de002eaa605ade574830e7e8d1693)
|
||||
- ... [`e29fbed`](https://github.com/ImageMagick/ImageMagick6/commit/e29fbed480a847fd70671ffb445769cc07f87b40)
|
||||
- Removed methods that have been renamed. [`88f63de`](https://github.com/ImageMagick/ImageMagick6/commit/88f63de88c6242bfdbb669b90f44c1827f71aebf)
|
||||
- update copyright year [`f5cb4ce`](https://github.com/ImageMagick/ImageMagick6/commit/f5cb4ce9319066b5b4740f725d9f0f8a52368be8)
|
||||
- Fixed build error. [`8cb3ec3`](https://github.com/ImageMagick/ImageMagick6/commit/8cb3ec3f676b7b566f0590536894f11fac6cf8b4)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4828 [`37ac2f0`](https://github.com/ImageMagick/ImageMagick6/commit/37ac2f0185a2afc88de705937f1e1e57004aa6ba)
|
||||
|
||||
## [6.9.12-38](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-37...6.9.12-38) - 2022-02-05
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`0ec8137`](https://github.com/ImageMagick/ImageMagick6/commit/0ec813759359a1a9f4e37a1696bb2f967c917776)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44424 [`bbf05a3`](https://github.com/ImageMagick/ImageMagick6/commit/bbf05a3449db3555cc05f4f3cacf172d6a0d35cc)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4793 [`dd65574`](https://github.com/ImageMagick/ImageMagick6/commit/dd655741bb71f7a129757fc0676e8aa328b44dad)
|
||||
- ... [`c726d86`](https://github.com/ImageMagick/ImageMagick6/commit/c726d861a67aadf697eb35b8847f6431b47dec1e)
|
||||
- release [`b5bb28a`](https://github.com/ImageMagick/ImageMagick6/commit/b5bb28a0ca2e53b668e4057a0cb04166ef781793)
|
||||
- pending release [`fa0b758`](https://github.com/ImageMagick/ImageMagick6/commit/fa0b758566ef994436fc9d9c14b68b433e2dd513)
|
||||
- avoid deep recursion [`513854d`](https://github.com/ImageMagick/ImageMagick6/commit/513854d34c8e505207c4c4a4cb0932ef7770fa05)
|
||||
- Corrected setting delay. [`bd7f6d7`](https://github.com/ImageMagick/ImageMagick6/commit/bd7f6d781953b415e7d5f4830feebbe87a54e62f)
|
||||
- VID images not permitted when compositing [`f4529c0`](https://github.com/ImageMagick/ImageMagick6/commit/f4529c0dcf3a8f96c438086b28fbef8338cda0b1)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44401 [`e94e616`](https://github.com/ImageMagick/ImageMagick6/commit/e94e616aff39358e09d6ae3180baf3cb59923690)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4807 [`bcbcfeb`](https://github.com/ImageMagick/ImageMagick6/commit/bcbcfeb3b697e8ec1a105dc7c7099f5f9191f172)
|
||||
- reference https://github.com/ImageMagick/ImageMagick/issues/4807 [`f2ee9a7`](https://github.com/ImageMagick/ImageMagick6/commit/f2ee9a74d52794b4ef9e62e71d4906d5cab9ef27)
|
||||
- check if image extent is NaN [`0608714`](https://github.com/ImageMagick/ImageMagick6/commit/0608714e4b8df32180359ba502990693ccfe3115)
|
||||
|
||||
## [6.9.12-37](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-36...6.9.12-37) - 2022-01-29
|
||||
|
||||
### Commits
|
||||
|
||||
- permit compositing MPRI images [`4dd4d0d`](https://github.com/ImageMagick/ImageMagick6/commit/4dd4d0df449acb13fb859041b4996af58243e352)
|
||||
- bump patch level version [`e662b69`](https://github.com/ImageMagick/ImageMagick6/commit/e662b69dd2cb3209339aff3c277493ef18f72a92)
|
||||
- pending release [`f0b31c1`](https://github.com/ImageMagick/ImageMagick6/commit/f0b31c169c00ad9e688b89e6a17e2678cc91c733)
|
||||
- check for excessive color name length [`1025a9b`](https://github.com/ImageMagick/ImageMagick6/commit/1025a9b0373dd194fc4529424e80396f35b1bbf4)
|
||||
- pending release [`f1e0995`](https://github.com/ImageMagick/ImageMagick6/commit/f1e09958774501f6e39e4b06deed0c351b8158ca)
|
||||
- restore MPRI URI [`d624f7f`](https://github.com/ImageMagick/ImageMagick6/commit/d624f7f008450eded4f006517e3275647eb69864)
|
||||
|
||||
## [6.9.12-36](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-35...6.9.12-36) - 2022-01-28
|
||||
|
||||
### Commits
|
||||
|
||||
- check for excessive memory request when drawing [`50aeffe`](https://github.com/ImageMagick/ImageMagick6/commit/50aeffee5b880716bc3fbca6edf990a853b04a4d)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4766 [`77fc0b9`](https://github.com/ImageMagick/ImageMagick6/commit/77fc0b952bf505ff10b5abb94b33206f31056e06)
|
||||
- It's a new dawn; It's a new day; It's a new life; For ImageMagick [`49ea804`](https://github.com/ImageMagick/ImageMagick6/commit/49ea804be9295c12b457843271042e2e3521750e)
|
||||
- promote blocksize from int to ssize_t [`ba2e0ef`](https://github.com/ImageMagick/ImageMagick6/commit/ba2e0efa42a0ac656fa4b01beb6500915ee11bcd)
|
||||
- pending release [`fca98f0`](https://github.com/ImageMagick/ImageMagick6/commit/fca98f0ad524641afd5f0c4bf42852ebaf8c1c27)
|
||||
- pending release [`fee44f7`](https://github.com/ImageMagick/ImageMagick6/commit/fee44f7b445cdca56a5ec19a2878608a511098c9)
|
||||
- ... [`1ac7d3d`](https://github.com/ImageMagick/ImageMagick6/commit/1ac7d3da9c45ee15ef7421d3ae62943f72f3cdab)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43967 [`f5f594a`](https://github.com/ImageMagick/ImageMagick6/commit/f5f594abe588bcc6ee870998bc801ede67e5b8b5)
|
||||
- pending release [`44065d3`](https://github.com/ImageMagick/ImageMagick6/commit/44065d3e7ede7012ab32bb560d838eed9507720d)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4771 [`8e326c6`](https://github.com/ImageMagick/ImageMagick6/commit/8e326c63f27c544e1dbbb1a329256306e93f1a70)
|
||||
- PDF unicode title [`bf36be4`](https://github.com/ImageMagick/ImageMagick6/commit/bf36be46887cdc65c8add8c6bfed20a0c4ae290d)
|
||||
- Added missing version check. [`9cfea23`](https://github.com/ImageMagick/ImageMagick6/commit/9cfea235600550f02b2df61c276c438ab031441e)
|
||||
|
||||
## [6.9.12-35](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-34...6.9.12-35) - 2022-01-22
|
||||
|
||||
### Commits
|
||||
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4629 [`dea9fb3`](https://github.com/ImageMagick/ImageMagick6/commit/dea9fb319c9f4564662e0f1705856854aec01605)
|
||||
- Build ImageMagick on Windows with VisualStudio 2022 instead. [`a9b405b`](https://github.com/ImageMagick/ImageMagick6/commit/a9b405b9e1bd219351d8961c9ccfddbc2a299d3a)
|
||||
- Use same checks as in IM7. [`a93c000`](https://github.com/ImageMagick/ImageMagick6/commit/a93c000f4585e9ef3b0a8a8f55bdcc25575e21b7)
|
||||
- permit 4GB blocks [`23b4299`](https://github.com/ImageMagick/ImageMagick6/commit/23b42998f5b3345d1915d4222cc2e858badca639)
|
||||
- ... [`e8b78e7`](https://github.com/ImageMagick/ImageMagick6/commit/e8b78e7bae67150667f3037932d0b3f1bc00434d)
|
||||
- improved fix for possible DoS for certain SVG constructs [`84ec305`](https://github.com/ImageMagick/ImageMagick6/commit/84ec30550c3146f525383f18a786a6bbd5028a93)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4704 [`25c9e4d`](https://github.com/ImageMagick/ImageMagick6/commit/25c9e4df716f34519d346369892b030ee5155312)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4704 [`9002280`](https://github.com/ImageMagick/ImageMagick6/commit/90022807243230deea06b9dcc874d2a41c611631)
|
||||
- AVIF is supported by the HEIC coder [`2287dca`](https://github.com/ImageMagick/ImageMagick6/commit/2287dca493099e423ca751bf55a3f114fc848a96)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4639 [`2318bfb`](https://github.com/ImageMagick/ImageMagick6/commit/2318bfb4009f8742b4c09007f3c8ba72bac7bf89)
|
||||
- Removed comment. [`f5bac9b`](https://github.com/ImageMagick/ImageMagick6/commit/f5bac9b20849fc7c540550e15f3ae839faf506fb)
|
||||
- eliminate C++ compiler warnings [`08dd651`](https://github.com/ImageMagick/ImageMagick6/commit/08dd6515f47bf4276797b46b9c81e016c7c46993)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4681 [`21bddc2`](https://github.com/ImageMagick/ImageMagick6/commit/21bddc28dcc31dde7d23b25009e1efbedcbae174)
|
||||
- Added checks for invalid PSD channel size. [`e26d718`](https://github.com/ImageMagick/ImageMagick6/commit/e26d718edaf73793c7a0f2f609ecf662fcccd562)
|
||||
- eliminate rare memory leak [`cf21bd4`](https://github.com/ImageMagick/ImageMagick6/commit/cf21bd4a4dd173a156c529082b6eb074c6aced71)
|
||||
- revert [`dada640`](https://github.com/ImageMagick/ImageMagick6/commit/dada640f2732a4ae8e524ac95c1b998cf0102a80)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4654 [`aee3f00`](https://github.com/ImageMagick/ImageMagick6/commit/aee3f004aa62bafb20dcb7c7c0675ee7d5bf9255)
|
||||
- Changed the build of configure to 64-bit. [`f5cb4bb`](https://github.com/ImageMagick/ImageMagick6/commit/f5cb4bb894806c595b08591f7ff755caed117fe6)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43390 [`2ff94fa`](https://github.com/ImageMagick/ImageMagick6/commit/2ff94fab76c89707ed241d3a85e3881d88d1b032)
|
||||
- ... [`bbb86a2`](https://github.com/ImageMagick/ImageMagick6/commit/bbb86a2c59fabc73d0262c70ae71ce80a89b4c5e)
|
||||
- zero papersize geometry [`4382359`](https://github.com/ImageMagick/ImageMagick6/commit/4382359ee5d87266c25646f68da20d4229d771bd)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4679 [`8854349`](https://github.com/ImageMagick/ImageMagick6/commit/88543494464bf94ef3430ba33bb34c62ba5050d6)
|
||||
- pending release [`aff974e`](https://github.com/ImageMagick/ImageMagick6/commit/aff974eb0da8eaee7edf3acbe945a2d8bb4a4c8e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4660 [`fd1df0b`](https://github.com/ImageMagick/ImageMagick6/commit/fd1df0b69806c4d820c277759b5171795502dd70)
|
||||
- Fixed possible memory leak. [`e5bee23`](https://github.com/ImageMagick/ImageMagick6/commit/e5bee2335ec13cff0171e9517f862298bb7f0c0a)
|
||||
- ... [`f7a43f3`](https://github.com/ImageMagick/ImageMagick6/commit/f7a43f3552a6f47a1258a524ec8ed33250601839)
|
||||
- Fixed Windows build. [`e838900`](https://github.com/ImageMagick/ImageMagick6/commit/e838900d9380feba6900adc7537eea852cd478d5)
|
||||
- cosmetic [`623e681`](https://github.com/ImageMagick/ImageMagick6/commit/623e6813fcfe68729d78cc27b4d9bc77a678c760)
|
||||
- ... [`a4d1e39`](https://github.com/ImageMagick/ImageMagick6/commit/a4d1e399130e50698cb1210e95224f7cd301ba8d)
|
||||
- revert [`46859fd`](https://github.com/ImageMagick/ImageMagick6/commit/46859fda719f814ec7e1fbbc37ed66b6706d4094)
|
||||
- fuzzy equality check [`0256b55`](https://github.com/ImageMagick/ImageMagick6/commit/0256b550e7fd2bcec82802f4c349f6e64ad1d06a)
|
||||
- pending release [`d02bc00`](https://github.com/ImageMagick/ImageMagick6/commit/d02bc0072070ef2f33ee6d8acca436a720b9861b)
|
||||
- Added move to use the installed version of Strawberry Perl instead. [`d68e6fa`](https://github.com/ImageMagick/ImageMagick6/commit/d68e6faf1d817c9b4db97b1643226dfce2a90dfc)
|
||||
- Allow workflow dispatch. [`809c4ce`](https://github.com/ImageMagick/ImageMagick6/commit/809c4cefefea926887e17f63093a98223c62d857)
|
||||
|
||||
## [6.9.12-34](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-33...6.9.12-34) - 2021-12-22
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`39b8934`](https://github.com/ImageMagick/ImageMagick6/commit/39b8934f42179a4a79b41d3fa141b8fac7064ea2)
|
||||
- Set the colorspace after the width and height of the image have been checked. [`3fd8496`](https://github.com/ImageMagick/ImageMagick6/commit/3fd8496d027b4b03e622cbf093e0b28d1e30d4ac)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4626 [`c10351c`](https://github.com/ImageMagick/ImageMagick6/commit/c10351c16b8d2cabd11d2627a02de522570f6ceb)
|
||||
- ... [`8093989`](https://github.com/ImageMagick/ImageMagick6/commit/8093989a6bf0ea36a2e81d61400e47c9cdba3032)
|
||||
- check for unbalanced parenthesis [`6fdd03b`](https://github.com/ImageMagick/ImageMagick6/commit/6fdd03b7fef68cfdb1c0f87d5e0e72a29f2d0336)
|
||||
- pending release [`0b0cbf7`](https://github.com/ImageMagick/ImageMagick6/commit/0b0cbf7b0f5c2ddcd41c85fc2da64d4771f80018)
|
||||
- Corrected method call. [`05259b5`](https://github.com/ImageMagick/ImageMagick6/commit/05259b51165aa26f9ec265e201315391a5a958b4)
|
||||
|
||||
## [6.9.12-33](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-32...6.9.12-33) - 2021-12-18
|
||||
|
||||
### Commits
|
||||
|
||||
- Swapped the Sync8BimProfile and the SyncExifProfile methods. [`77b718c`](https://github.com/ImageMagick/ImageMagick6/commit/77b718c3f5d5e39710d227f2bb6a7fb65abd4c57)
|
||||
- ... [`3deb899`](https://github.com/ImageMagick/ImageMagick6/commit/3deb89958f6787deca910570ff5fb8d27210b554)
|
||||
- Improved adjustment of page offset when resizing an image. [`accf336`](https://github.com/ImageMagick/ImageMagick6/commit/accf33670091ef833b45ef5bb913812e16469333)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4558 [`fb428af`](https://github.com/ImageMagick/ImageMagick6/commit/fb428af466701e487cfd0f657c78e1f74da4c12b)
|
||||
- Also sync the exif profile inside the 8bim profile. [`3be80bc`](https://github.com/ImageMagick/ImageMagick6/commit/3be80bc9c9b5e49a6266b680e38d39d5ecaeaadb)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42504 [`9f7310b`](https://github.com/ImageMagick/ImageMagick6/commit/9f7310b7a3c80f132c548ffb8f29eea7dabae8c2)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4587 [`526a3d1`](https://github.com/ImageMagick/ImageMagick6/commit/526a3d19790b753e4d7f63515dc667a3472f9eda)
|
||||
- https://github.com/ImageMagick/ImageMagick/security/code-scanning/31 [`094e143`](https://github.com/ImageMagick/ImageMagick6/commit/094e143714873a2903093ea6c128af267ef8c997)
|
||||
- revert [`7cbce51`](https://github.com/ImageMagick/ImageMagick6/commit/7cbce514e6a0f530b5f50b960f6d95c62c9416f5)
|
||||
- improved adjustment of page offset when resizing an image [`c8bb427`](https://github.com/ImageMagick/ImageMagick6/commit/c8bb4278eb7be195cc45ba08e617987cf34dad1e)
|
||||
- pending release [`a518f31`](https://github.com/ImageMagick/ImageMagick6/commit/a518f310bc77991712a53f6984f9f0edce706174)
|
||||
- Corrected the built-in video encoder and decoder. [`91320cc`](https://github.com/ImageMagick/ImageMagick6/commit/91320cc53f6c5e8b59b5e22e0042d62b230344ba)
|
||||
- Corrected method name. [`15aadb7`](https://github.com/ImageMagick/ImageMagick6/commit/15aadb7691a3a8cd47cbbae9ca3ec58c01acc3c3)
|
||||
- Restored debug message. [`2ab41fb`](https://github.com/ImageMagick/ImageMagick6/commit/2ab41fbf336faf0fbb9d3217b72c6f6336b7767b)
|
||||
- ... [`add9cb1`](https://github.com/ImageMagick/ImageMagick6/commit/add9cb14e14eef02806715d97abcf5d04a3e55dd)
|
||||
- Corrected typecast. [`87ce0d8`](https://github.com/ImageMagick/ImageMagick6/commit/87ce0d8fa8446b142938f1be63cf3e6b866697cf)
|
||||
|
||||
## [6.9.12-32](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-31...6.9.12-32) - 2021-12-04
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`60be1a6`](https://github.com/ImageMagick/ImageMagick6/commit/60be1a6c9698fc970c087b5384da19829b8fb386)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4501 [`936332e`](https://github.com/ImageMagick/ImageMagick6/commit/936332e6b6a5e6105f02b2d9232bcbeafa681eb3)
|
||||
- revert memory leak patch [`e735d88`](https://github.com/ImageMagick/ImageMagick6/commit/e735d88c251a4c7ef60c39ae3322fc7b4cbb50f9)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4501 [`fa5c3aa`](https://github.com/ImageMagick/ImageMagick6/commit/fa5c3aa6c111b8c4c83d945e992da95200dbdba6)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4512 [`4c0fcf3`](https://github.com/ImageMagick/ImageMagick6/commit/4c0fcf39fd51f2c89832767e1befaeda7ff86097)
|
||||
- Added missing checks for the return value of the exr methods. [`5beeab8`](https://github.com/ImageMagick/ImageMagick6/commit/5beeab8a1297dbae1f05f88aeffe26278b744a6f)
|
||||
- ASAN returns false positives for OMP [`976dba6`](https://github.com/ImageMagick/ImageMagick6/commit/976dba67f1a4352d838a2a9f823812892f8230b5)
|
||||
- ... [`c611e8f`](https://github.com/ImageMagick/ImageMagick6/commit/c611e8f5102bbcf20ac0a4fd3e7e719779c60fd9)
|
||||
- Added check for invalid size. [`94f76dd`](https://github.com/ImageMagick/ImageMagick6/commit/94f76dd2f760241bec51e7d66873e77a58d812ba)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4501 [`2a29e35`](https://github.com/ImageMagick/ImageMagick6/commit/2a29e35480271e14a0961492867e9d246e64cc05)
|
||||
- pending release [`be1bc1d`](https://github.com/ImageMagick/ImageMagick6/commit/be1bc1d9650b4530a037d7c2d58d1a5a4b73f04e)
|
||||
- pending release [`b5525d6`](https://github.com/ImageMagick/ImageMagick6/commit/b5525d640ea48befa9cfb4e154672d4076f06aec)
|
||||
- pending release [`3bf73bf`](https://github.com/ImageMagick/ImageMagick6/commit/3bf73bf7e3f846dd6d3e20b843e8a34e8f4f7589)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4535 [`9a7d07d`](https://github.com/ImageMagick/ImageMagick6/commit/9a7d07d8b22098210a47cabb99cb58de599bb5ba)
|
||||
- eliminate compiler warning [`63f5b43`](https://github.com/ImageMagick/ImageMagick6/commit/63f5b4329181e70cff1a646229dc3b3ba5a40d69)
|
||||
- pending release [`9e8e460`](https://github.com/ImageMagick/ImageMagick6/commit/9e8e460e7ef26ab6f5666c7292f7b82752a09b7d)
|
||||
- pending release [`1832b1d`](https://github.com/ImageMagick/ImageMagick6/commit/1832b1d334ca00e66ad6ff5f115750692cb6b3b7)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/4529 [`e35c98c`](https://github.com/ImageMagick/ImageMagick6/commit/e35c98c5ab111284b198d0022ed479d0e6ecef3c)
|
||||
- close input file if early exit on exception [`fd51385`](https://github.com/ImageMagick/ImageMagick6/commit/fd513853ac20e6ae784a795fff41cacfe8b54e73)
|
||||
|
||||
## [6.9.12-31](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-30...6.9.12-31) - 2021-11-21
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`9e6a637`](https://github.com/ImageMagick/ImageMagick6/commit/9e6a63782e4d22786b82b1db6575181724fdb4f1)
|
||||
- Corrected OpenCL define checks. [`149fb8a`](https://github.com/ImageMagick/ImageMagick6/commit/149fb8a345ccb58cc70d3252be5d0f7cf6850d64)
|
||||
- pending release [`4976493`](https://github.com/ImageMagick/ImageMagick6/commit/49764932cdb7e0ac966828ce15a819d85ccbeae3)
|
||||
- Removed unnecessary define. [`6722a79`](https://github.com/ImageMagick/ImageMagick6/commit/6722a798f2b4385a293555675be8967890448b38)
|
||||
- eliminate possible divide by zero [`8c80027`](https://github.com/ImageMagick/ImageMagick6/commit/8c80027ca8d6c84c3ed815059bbf353eb8dc2d58)
|
||||
|
||||
## [6.9.12-30](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-29...6.9.12-30) - 2021-11-20
|
||||
|
||||
### Commits
|
||||
|
||||
- https://github.com/ImageMagick/ImageMagick6/issues/168 [`9a70911`](https://github.com/ImageMagick/ImageMagick6/commit/9a70911bc8b3c6f3a49bb54766cfba0e69f2a2fe)
|
||||
- ... [`3b2a005`](https://github.com/ImageMagick/ImageMagick6/commit/3b2a005a5a58698d9cb99e48d46ce19d19abfd39)
|
||||
- mitigate UBSAN alerts [`1219eac`](https://github.com/ImageMagick/ImageMagick6/commit/1219eac5d3bfb796753597f37412df567f629c08)
|
||||
- check for NULL index channel [`f63a211`](https://github.com/ImageMagick/ImageMagick6/commit/f63a2117ba05da426d996c0aee92e5b0c7b1f852)
|
||||
- eliminate compiler warning [`7864d48`](https://github.com/ImageMagick/ImageMagick6/commit/7864d48ddb52c490484a890eea21717cab01c61c)
|
||||
- check if indexes are null [`23bd057`](https://github.com/ImageMagick/ImageMagick6/commit/23bd0570ebb0b845aa62e0c66dd7d822594201ea)
|
||||
- https://github.com/ImageMagick/ImageMagick6/issues/168 [`7599dd9`](https://github.com/ImageMagick/ImageMagick6/commit/7599dd92e8ad19993a2eb27a2b5103d853bce57f)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41172 [`5f77de4`](https://github.com/ImageMagick/ImageMagick6/commit/5f77de42c37c184e6db6bbbad52a34070c5a7a2d)
|
||||
- check for NULL indexes [`e008625`](https://github.com/ImageMagick/ImageMagick6/commit/e00862551327e0b2c4362d6d8f1b78bb4f3496af)
|
||||
- check for NULL indexes [`3644f40`](https://github.com/ImageMagick/ImageMagick6/commit/3644f40f41d1bf1134e1d6fcd1f227436d045945)
|
||||
- pending release [`1864067`](https://github.com/ImageMagick/ImageMagick6/commit/1864067f7083a965bc4c4f3ac36ab6976d80a831)
|
||||
- mitigate UBSAN alerts [`a4dec0c`](https://github.com/ImageMagick/ImageMagick6/commit/a4dec0cbdeb1ed2acf79e8efe664cdb2348e524b)
|
||||
- mitigate UBSAN alerts [`99841ed`](https://github.com/ImageMagick/ImageMagick6/commit/99841edc96458bad24754b587de79693da67224b)
|
||||
- destroy image list rather than just the first image [`c42cd7c`](https://github.com/ImageMagick/ImageMagick6/commit/c42cd7c143e501aff4d624a2591e7f26ee5d5ce9)
|
||||
- less aggressive sanity check [`dda7d0b`](https://github.com/ImageMagick/ImageMagick6/commit/dda7d0bb7d4f675f652fea20dff66778fb2bc88b)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4495 [`d46d0c6`](https://github.com/ImageMagick/ImageMagick6/commit/d46d0c647aa67bcfffec5dbd456c24b9c66de66e)
|
||||
- pending release [`506ae2c`](https://github.com/ImageMagick/ImageMagick6/commit/506ae2c2e2d4bbb07d4ba4075d06aadccbc675fd)
|
||||
|
||||
## [6.9.12-29](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-28...6.9.12-29) - 2021-11-14
|
||||
|
||||
### Commits
|
||||
|
||||
- latest docs [`f624d40`](https://github.com/ImageMagick/ImageMagick6/commit/f624d406e79ce1d5f600a1ff569bf02d6eccf4b2)
|
||||
- Use CheckMergedImageAlpha when layer size is zero. [`b614db7`](https://github.com/ImageMagick/ImageMagick6/commit/b614db76102d0f4c38149d2b6c63e091bc975b6b)
|
||||
- early exit on exception [`b272aca`](https://github.com/ImageMagick/ImageMagick6/commit/b272acab91444f2115099fe51ee6c91bb4db5d50)
|
||||
- Improved detection of %%. [`cddc5be`](https://github.com/ImageMagick/ImageMagick6/commit/cddc5be6a7150e9c47fd155b402fc896e1d9d0b6)
|
||||
- ... [`c66229f`](https://github.com/ImageMagick/ImageMagick6/commit/c66229fb1a73213f392752050d49084d32032aec)
|
||||
- ... [`8867bad`](https://github.com/ImageMagick/ImageMagick6/commit/8867bada8703071aa5356240d677b2ac1069ff3e)
|
||||
- Corrected detection of the CMYK colorspace. [`af56076`](https://github.com/ImageMagick/ImageMagick6/commit/af56076082b5703d65f754a501876d082743a0ab)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4452 [`ba084f6`](https://github.com/ImageMagick/ImageMagick6/commit/ba084f6bda2edbacf1df824bb214728234ffaa86)
|
||||
- pending release [`4dbdd3b`](https://github.com/ImageMagick/ImageMagick6/commit/4dbdd3bd7d4cb95bc883010d70d0e31d69308536)
|
||||
- pending release [`efe0cae`](https://github.com/ImageMagick/ImageMagick6/commit/efe0caec013e87837c29a83e57e5ea7397ce8645)
|
||||
- ... [`4efb23e`](https://github.com/ImageMagick/ImageMagick6/commit/4efb23ee93a2026434e5b0253ddb9c3622c1b1ab)
|
||||
- ... [`04c02b3`](https://github.com/ImageMagick/ImageMagick6/commit/04c02b3ad4ae57a28c87a094fd72f153b6dc49bb)
|
||||
|
||||
## [6.9.12-28](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-27...6.9.12-28) - 2021-10-29
|
||||
|
||||
### Commits
|
||||
|
||||
- pending release [`0ca0004`](https://github.com/ImageMagick/ImageMagick6/commit/0ca000449de02d87e3fccba10255472417a4d3dc)
|
||||
- ... [`4b5c30c`](https://github.com/ImageMagick/ImageMagick6/commit/4b5c30c0b879dc4c670c27f53721df60896724c2)
|
||||
- ... [`dd1dc33`](https://github.com/ImageMagick/ImageMagick6/commit/dd1dc3392ee1ec775f9d53d2fe306e458dadaef2)
|
||||
- ... [`e10fc76`](https://github.com/ImageMagick/ImageMagick6/commit/e10fc76ab4c7850547271a73d1b1c7ebebb691be)
|
||||
- pending release [`af2ee30`](https://github.com/ImageMagick/ImageMagick6/commit/af2ee30d2201829812864d7d8aadee0e46cd5d91)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40451 [`ba7e11c`](https://github.com/ImageMagick/ImageMagick6/commit/ba7e11c5ea554317c28977ff6e5afc4f050a7ae1)
|
||||
- Fix stack overflow when parsing malicious ps image file. [`f74b2b1`](https://github.com/ImageMagick/ImageMagick6/commit/f74b2b19d13df6b61b5ede33aa7249dcb0f496a5)
|
||||
- pending release [`1898d52`](https://github.com/ImageMagick/ImageMagick6/commit/1898d52023601f8ea5bdb583f9dd2b3a435572cb)
|
||||
- pending release [`f59af4f`](https://github.com/ImageMagick/ImageMagick6/commit/f59af4f713acf87b7279e68c01ac9579fea8793a)
|
||||
- cosmetic [`d480691`](https://github.com/ImageMagick/ImageMagick6/commit/d480691c7d0ad3f16ff94148e781cbaff05ed1be)
|
||||
|
||||
## [6.9.12-27](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-26...6.9.12-27) - 2021-10-25
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`60fcc24`](https://github.com/ImageMagick/ImageMagick6/commit/60fcc24991c45628286b8a88ccd5983d4979626d)
|
||||
- pending release [`b6fe79f`](https://github.com/ImageMagick/ImageMagick6/commit/b6fe79f95ebd91a0439cbb7adb4602c4d4aa154e)
|
||||
|
||||
## [6.9.12-26](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-25...6.9.12-26) - 2021-10-24
|
||||
|
||||
### Commits
|
||||
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4379 [`199a858`](https://github.com/ImageMagick/ImageMagick6/commit/199a8586fd1ab273b25dae3f75ff131f4b302ceb)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4378 [`c661299`](https://github.com/ImageMagick/ImageMagick6/commit/c661299cd1ff36d8783641cb4cffdffb0fd9041d)
|
||||
- adjust metrics is no longer sensitive to gravity [`6dc9251`](https://github.com/ImageMagick/ImageMagick6/commit/6dc9251f0dcc11d29dbb90f430431b553df46f35)
|
||||
- :1 [`cc76510`](https://github.com/ImageMagick/ImageMagick6/commit/cc765107a9c7e19607e7fd18feb89a22a563ebb4)
|
||||
- Revert adjustment of the y1 value [`122366e`](https://github.com/ImageMagick/ImageMagick6/commit/122366e570731f71c90e82f219c43d78864597a3)
|
||||
- Corrected versions in ChangeLog. [`7e972cc`](https://github.com/ImageMagick/ImageMagick6/commit/7e972cc7157ddaf638c8301945058970af0c114f)
|
||||
- https://oss-fuzz.com/testcase-detail/6308942275805184 [`5c82207`](https://github.com/ImageMagick/ImageMagick6/commit/5c822075c884a488242d8d5558964a087cc9db99)
|
||||
- eliminate compiler warning [`8afbdbc`](https://github.com/ImageMagick/ImageMagick6/commit/8afbdbc36fe128383b4fce3374c080ac34177b15)
|
||||
- fix stack overflow when parsing malicious tiff image [`85a370c`](https://github.com/ImageMagick/ImageMagick6/commit/85a370c79afeb45a97842b0959366af5236e9023)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4372 [`2466e9a`](https://github.com/ImageMagick/ImageMagick6/commit/2466e9a94e42b2511ef7016259a72a714808f9fe)
|
||||
- ... [`c4b9474`](https://github.com/ImageMagick/ImageMagick6/commit/c4b94746cb97fc81b0b552e14f4e462449e567b5)
|
||||
- pending release [`fd247de`](https://github.com/ImageMagick/ImageMagick6/commit/fd247de75a1f271474294cc97c09f291e58f2be3)
|
||||
- ... [`7671137`](https://github.com/ImageMagick/ImageMagick6/commit/76711376db504e9c786426e9381021889b00590e)
|
||||
- pending release [`adf4467`](https://github.com/ImageMagick/ImageMagick6/commit/adf446722724ea7cad8ebc6046e87df82aae4f05)
|
||||
- slight performance optimization [`627cf43`](https://github.com/ImageMagick/ImageMagick6/commit/627cf4307b93d5185fe877db8ebb51236043f350)
|
||||
- revert optimization [`07c8384`](https://github.com/ImageMagick/ImageMagick6/commit/07c838431ab2cd620daf1d43e35f8a3f0b23b7a5)
|
||||
- Correct more version numbers. [`b0a8b26`](https://github.com/ImageMagick/ImageMagick6/commit/b0a8b2655487ee5b6248897e5c955b8a44bfc790)
|
||||
- pending release [`a85dee3`](https://github.com/ImageMagick/ImageMagick6/commit/a85dee3187419ab8c8dc1385b0be9bd9c51c731c)
|
||||
- pending release [`175f33e`](https://github.com/ImageMagick/ImageMagick6/commit/175f33e13311562f51ae7b1631af65bb0ee29676)
|
||||
- ... [`6fe9741`](https://github.com/ImageMagick/ImageMagick6/commit/6fe9741ec186b9893bc87d39e83d0d705fe0fad5)
|
||||
- pending release [`3430fb8`](https://github.com/ImageMagick/ImageMagick6/commit/3430fb87b5714e3d50717497be71a0531600da76)
|
||||
- test release [`01e79c2`](https://github.com/ImageMagick/ImageMagick6/commit/01e79c207608bb7eacd4b6710663213773684dcd)
|
||||
|
||||
## [6.9.12-25](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-24...6.9.12-25) - 2021-10-10
|
||||
|
||||
### Commits
|
||||
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/4311 [`f6fdd03`](https://github.com/ImageMagick/ImageMagick6/commit/f6fdd03216d401b7e3b558218f7805b61d2cecc5)
|
||||
- don't adjust metrics if gravity is undefined [`79c537c`](https://github.com/ImageMagick/ImageMagick6/commit/79c537c7bdfe0f71b4354ace4d9c9976c29b4c4a)
|
||||
- ... [`cfcd23e`](https://github.com/ImageMagick/ImageMagick6/commit/cfcd23ee92152228ba36ac12d6fc0a6ec34d41c0)
|
||||
- Moved using namespace std after ImageMagick header files to fix issues when enabling ISO C++ 17 and ISO C17 [`2c96ab5`](https://github.com/ImageMagick/ImageMagick6/commit/2c96ab5d098fcf3d2002378355bc2ad3eaccaddf)
|
||||
- ... [`24961a9`](https://github.com/ImageMagick/ImageMagick6/commit/24961a9e25ac31b7ddd42eb8f1c130717971da16)
|
||||
- fix ANSI compiler error [`94119fe`](https://github.com/ImageMagick/ImageMagick6/commit/94119febc83c74913017289e5060e1e5ccf378d4)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4314 [`c8bba5b`](https://github.com/ImageMagick/ImageMagick6/commit/c8bba5bf458c63486417c6f0084ce383c89d78b1)
|
||||
- pending release [`af67f12`](https://github.com/ImageMagick/ImageMagick6/commit/af67f1234b95fcad2fc28560fb8136defc16108a)
|
||||
- ... [`48e52d0`](https://github.com/ImageMagick/ImageMagick6/commit/48e52d0ef0ce365a5a6e7c4d20cff582be835786)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39708 [`5569c6c`](https://github.com/ImageMagick/ImageMagick6/commit/5569c6cc38ea99d9cba667deaddf09ba1ec42005)
|
||||
|
||||
## [6.9.12-24](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-23...6.9.12-24) - 2021-10-03
|
||||
|
||||
### Commits
|
||||
|
||||
- Adjust the x1 offset of the bounds to make sure a font is rendered inside the canvas. [`1746362`](https://github.com/ImageMagick/ImageMagick6/commit/17463624f35b293f5e1689b8039bcdae96bdd8d1)
|
||||
- ignore zero-length profiles [`94cc6fd`](https://github.com/ImageMagick/ImageMagick6/commit/94cc6fd1c2f3ad739903726ec7e63d31a2b3d747)
|
||||
- Correct replacement of spaces that use more than one octet. [`1d59719`](https://github.com/ImageMagick/ImageMagick6/commit/1d597191bd1f45d05ff041c89b7e3f8759e9eaf5)
|
||||
- ... [`f4277c4`](https://github.com/ImageMagick/ImageMagick6/commit/f4277c460e804659535de8e2d8dd9507ab50bb2f)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/4227 [`1c5e41a`](https://github.com/ImageMagick/ImageMagick6/commit/1c5e41a934fd40ce86f37ecee6b54a6940183f1e)
|
||||
- Revert patch because this breaks font rendering for other fonts. [`c55ddb1`](https://github.com/ImageMagick/ImageMagick6/commit/c55ddb1d646b1540afafd918be89eef69d83b467)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4278 [`4748ccc`](https://github.com/ImageMagick/ImageMagick6/commit/4748ccc31888db1e8610084b611710e7e2dadbfe)
|
||||
- Correction of the bounds measurements. [`fd9443b`](https://github.com/ImageMagick/ImageMagick6/commit/fd9443b46cb0254f1a6908be2738950d402169ab)
|
||||
- pending release [`c15d3ae`](https://github.com/ImageMagick/ImageMagick6/commit/c15d3aef8ffe50174763ef00c5780e3d6c774232)
|
||||
- Added extra check to prevent replacing a non-breaking space with a newline. [`6e82f6f`](https://github.com/ImageMagick/ImageMagick6/commit/6e82f6f182f585ecc1cc70cd3fe7c5adb6c6c5ea)
|
||||
- Silence warning. [`32bda8b`](https://github.com/ImageMagick/ImageMagick6/commit/32bda8bb2132fad29eb6e175d3da92e45f9c25af)
|
||||
- cosmetic [`d2b4807`](https://github.com/ImageMagick/ImageMagick6/commit/d2b4807f8eefb98f150901f941f6a1eea892f867)
|
||||
- Use same code as IM7. [`770902f`](https://github.com/ImageMagick/ImageMagick6/commit/770902feba3806065e77e477d3b796a185e23a82)
|
||||
- Space pointer was still pointing to the old string. [`96f65f4`](https://github.com/ImageMagick/ImageMagick6/commit/96f65f410afee03d45563c5a5fe01f4496d9b581)
|
||||
- argument is const [`4137ebc`](https://github.com/ImageMagick/ImageMagick6/commit/4137ebce1e559a483bb50c6aab283a30a938d63d)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39091 [`a96f221`](https://github.com/ImageMagick/ImageMagick6/commit/a96f221bfa150943d0f63b6b44910c9abd8988b2)
|
||||
- check return status [`cca5a6a`](https://github.com/ImageMagick/ImageMagick6/commit/cca5a6a3f9eacd6c5db570f90dcd3b73a30b2f59)
|
||||
- Fixed build error. [`78e0310`](https://github.com/ImageMagick/ImageMagick6/commit/78e03105e90cd4ac5cbe2970a31a13f66c1270bf)
|
||||
- Cosmetic. [`7467737`](https://github.com/ImageMagick/ImageMagick6/commit/74677375e48303e8d3355a1cd63bdd5ee0e90269)
|
||||
- ... [`92194b2`](https://github.com/ImageMagick/ImageMagick6/commit/92194b2ac097619013e2be312b0121c0f75911a9)
|
||||
- Whitespace. [`d338817`](https://github.com/ImageMagick/ImageMagick6/commit/d3388174b0603040fd78d681fa85cf1080bef493)
|
||||
|
||||
## [6.9.12-23](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-22...6.9.12-23) - 2021-09-18
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`a9b45b4`](https://github.com/ImageMagick/ImageMagick6/commit/a9b45b47282987cd0df488ed597e7b95179960c9)
|
||||
- Don't set the resolution when the cropbox is used. [`de18836`](https://github.com/ImageMagick/ImageMagick6/commit/de18836f1e1ded1395df589e5977c1aa762b486c)
|
||||
- pending release [`54a7092`](https://github.com/ImageMagick/ImageMagick6/commit/54a70929c2ad8df2321d4b3fc9c7d1b986ddaa2b)
|
||||
- Added missing null checks. [`c7039d2`](https://github.com/ImageMagick/ImageMagick6/commit/c7039d20a2fe018f041e40459d722188293012c5)
|
||||
- Give the buffer a proper size instead of "over allocating". [`ecd4719`](https://github.com/ImageMagick/ImageMagick6/commit/ecd4719848da7562d3724e6f1b7bf24d1b72f1fc)
|
||||
- Added link to advisory. [`bd43241`](https://github.com/ImageMagick/ImageMagick6/commit/bd432413b03d7eb01ad5dcb14127910b7f80ff4c)
|
||||
- pending release [`4230c6e`](https://github.com/ImageMagick/ImageMagick6/commit/4230c6e6ab33f8ccaff98529284a6285dc10ec61)
|
||||
- Added missing bom. [`bd9fb58`](https://github.com/ImageMagick/ImageMagick6/commit/bd9fb58de3d9e3847054ccc7ff5caba72cd5877d)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4235 [`eef08cc`](https://github.com/ImageMagick/ImageMagick6/commit/eef08ccf4da69848a6f475806f23711577f62c9e)
|
||||
|
||||
## [6.9.12-22](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-21...6.9.12-22) - 2021-09-12
|
||||
|
||||
### Commits
|
||||
|
||||
- Moved RSVG rendering to a separate method. [`1dc463e`](https://github.com/ImageMagick/ImageMagick6/commit/1dc463eb50f48b9bd4f06530021f4fe52376e5d4)
|
||||
- Moved MSVG rendering to a separate method. [`a39da2b`](https://github.com/ImageMagick/ImageMagick6/commit/a39da2b112d2f36d78c5d79a821216385be7f8f3)
|
||||
- Use yaml template instead. [`edf63d3`](https://github.com/ImageMagick/ImageMagick6/commit/edf63d36a7af9468aa07ca2a4c7b9a98db67c1ec)
|
||||
- Clean up the remaining PDF files if reading one of the files fails. [`3177df6`](https://github.com/ImageMagick/ImageMagick6/commit/3177df671ee3904bdfe09c05d297fa1580253e98)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4059 [`9d97e95`](https://github.com/ImageMagick/ImageMagick6/commit/9d97e95150ed3cd7ddfc478248e48b9c0d40f56b)
|
||||
- Fixed incorrect check when module is used as the domain in policy.xml that would allow the use of a disabled module. [`8cd2fcd`](https://github.com/ImageMagick/ImageMagick6/commit/8cd2fcd33460826628a7590dc3ce74d7785e1598)
|
||||
- ... [`75e8372`](https://github.com/ImageMagick/ImageMagick6/commit/75e83721e27b60c7354cb3ec58205a9458999dd5)
|
||||
- check for EOF [`ae88f07`](https://github.com/ImageMagick/ImageMagick6/commit/ae88f07cd31bdbb671270349abdc48d9ca6463fb)
|
||||
- ... [`a6f6ee2`](https://github.com/ImageMagick/ImageMagick6/commit/a6f6ee269de56892b35ffbc03ab1accb4f593be9)
|
||||
- Use the correct rights. [`428e685`](https://github.com/ImageMagick/ImageMagick6/commit/428e68597fa904d0bdc133d878e12acd7dc60fa3)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38401 [`61c3f46`](https://github.com/ImageMagick/ImageMagick6/commit/61c3f4697b2915b10123c11b09f6cf58abe0c07e)
|
||||
- Added yml to the .editorconfig [`06c089b`](https://github.com/ImageMagick/ImageMagick6/commit/06c089b3fe5438882d54cc2ad4dbc7394b852643)
|
||||
- check for EOF [`b3bc44a`](https://github.com/ImageMagick/ImageMagick6/commit/b3bc44a3211edfa701075e3a178bb434050bb785)
|
||||
- Added extra policy check. [`899d06f`](https://github.com/ImageMagick/ImageMagick6/commit/899d06fb1a97083bddda51cc88abc0f79841667e)
|
||||
- Added early exists. [`005af2a`](https://github.com/ImageMagick/ImageMagick6/commit/005af2a1557c8b49bf1116c380435c8064f9f70c)
|
||||
- Revert break to make it possible to use and allow list. [`10c0f5b`](https://github.com/ImageMagick/ImageMagick6/commit/10c0f5b31bbea82ebd219a0da201a99a2e874c52)
|
||||
- pending release [`83b8cb1`](https://github.com/ImageMagick/ImageMagick6/commit/83b8cb1d99f0f842be50007572c7ecdb588e292d)
|
||||
- Added missing policy checks in RegisterStaticModules. [`69ea558`](https://github.com/ImageMagick/ImageMagick6/commit/69ea5587de17ef89476be47a3cb7f855c0355a74)
|
||||
- Minor optimization when nothing will change. [`bfbf998`](https://github.com/ImageMagick/ImageMagick6/commit/bfbf9988fd9350a6a4da03daa011539204eecdee)
|
||||
- pending release [`be2ebac`](https://github.com/ImageMagick/ImageMagick6/commit/be2ebac260ba43ede0b3beb5820a5d6492c35481)
|
||||
- Use AllPolicyRights instead. [`b60e171`](https://github.com/ImageMagick/ImageMagick6/commit/b60e17133b982d28816386b83174c2bc06dd39bd)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38573 [`c4bdacf`](https://github.com/ImageMagick/ImageMagick6/commit/c4bdacff93e145dc1dd282cca3b04127ceb71bf4)
|
||||
- pending release [`f48b623`](https://github.com/ImageMagick/ImageMagick6/commit/f48b6233e976f56a499a49c55b5f3f26c11451f5)
|
||||
- Added missing call to ConstrainColormapIndex. [`02ce9e1`](https://github.com/ImageMagick/ImageMagick6/commit/02ce9e1bbba067b2ebcc18d07456a22570cbf5f2)
|
||||
- pending release [`9146746`](https://github.com/ImageMagick/ImageMagick6/commit/9146746f54a24775225e541edc58364ab13e0126)
|
||||
- Changed build status link [`412d49b`](https://github.com/ImageMagick/ImageMagick6/commit/412d49b2b2a733401a469b7e658a1113e720c550)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/2579 [`843fd11`](https://github.com/ImageMagick/ImageMagick6/commit/843fd110d7d3b0fa5e00c553290739fde2778ab1)
|
||||
- Removed travis CI link. [`c3b1c13`](https://github.com/ImageMagick/ImageMagick6/commit/c3b1c1334809ad132dddbdfac91618b144fce796)
|
||||
- Also set RGB channels when reading the image (#167). [`4282b98`](https://github.com/ImageMagick/ImageMagick6/commit/4282b98eb645351ddf122faa67c94610718595dc)
|
||||
- Removed newline. [`8cc488a`](https://github.com/ImageMagick/ImageMagick6/commit/8cc488aaca954aa26406678a0032f40561a3c9b4)
|
||||
- Added donate badge. [`a3d7d3f`](https://github.com/ImageMagick/ImageMagick6/commit/a3d7d3f1926d060f8acb4417deed015a01efad01)
|
||||
|
||||
## [6.9.12-21](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-20...6.9.12-21) - 2021-09-04
|
||||
|
||||
### Commits
|
||||
|
||||
- Use different values per channel for scale and translate. [`109e236`](https://github.com/ImageMagick/ImageMagick6/commit/109e236860e35212a90b5eb6b93a6662ca208233)
|
||||
- Use link for the Windows build instructions instead. [`d8da2c5`](https://github.com/ImageMagick/ImageMagick6/commit/d8da2c53bdc4a738017a8ba346ab523935878faa)
|
||||
- ./configure --help no longer lists -disable-assert twice [`0aab306`](https://github.com/ImageMagick/ImageMagick6/commit/0aab3061aad8211bcec1eb0f4e479414c8a9a3f1)
|
||||
- ... [`397b5c3`](https://github.com/ImageMagick/ImageMagick6/commit/397b5c32487efdc5eb7daf206c6317fb670bad16)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4105 [`3afc3bc`](https://github.com/ImageMagick/ImageMagick6/commit/3afc3bc9d97ec424bd92ab5c74f090586d91fa0b)
|
||||
- initialize buffer before calling TIFFGetField() [`ce2f067`](https://github.com/ImageMagick/ImageMagick6/commit/ce2f0676f8766343ae2322ace7311a53c7ae6d97)
|
||||
- Added .editorconfig [`afad655`](https://github.com/ImageMagick/ImageMagick6/commit/afad65584be6d6d25902599b44f4c20c9a747692)
|
||||
- Add -HDRI to the quantum in the version string when HDRI is enabled. [`423a801`](https://github.com/ImageMagick/ImageMagick6/commit/423a8014dfa4705ebd8ec057ea78d99c224871d7)
|
||||
- pending release [`c4ed7a2`](https://github.com/ImageMagick/ImageMagick6/commit/c4ed7a29cf8695a67341175a329532947bc50b54)
|
||||
- Use UTC date as requested in #166. [`e0967ea`](https://github.com/ImageMagick/ImageMagick6/commit/e0967eae28b4594f08c0a443ee53ac15390cff4a)
|
||||
- Minor changes to the formatting of the parentheses. [`278a93e`](https://github.com/ImageMagick/ImageMagick6/commit/278a93e8940eff474a083b42dde39a0c7da1c85e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4121 [`6ba45df`](https://github.com/ImageMagick/ImageMagick6/commit/6ba45df1e4c67d9897262a7ff5706eb404f2ea7f)
|
||||
- pending release [`9eb3b4e`](https://github.com/ImageMagick/ImageMagick6/commit/9eb3b4ea7b66e515283c0f9b5158c0c2f368c324)
|
||||
- tweak the bilevel image type [`473c7cd`](https://github.com/ImageMagick/ImageMagick6/commit/473c7cd850bdc40c2d1e8e72c4d3b073f1079138)
|
||||
- https://oss-fuzz.com/testcase-detail/6502669439598592 [`995de33`](https://github.com/ImageMagick/ImageMagick6/commit/995de330310dd35531165d9471fe4d31e0fa79ae)
|
||||
- Add -dPrinted=false to the Ghostscript options (#4019) [`5f82ea4`](https://github.com/ImageMagick/ImageMagick6/commit/5f82ea411e7e1190f2f7aed8a0b1c97a42b6bd58)
|
||||
|
||||
## [6.9.12-20](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-19...6.9.12-20) - 2021-08-22
|
||||
|
||||
### Commits
|
||||
|
||||
- check if colorspace is incompatible before transforming it to sRGB [`fdf7e64`](https://github.com/ImageMagick/ImageMagick6/commit/fdf7e64ed09666a0c8f3588b47d302b01a7cdeaa)
|
||||
- the -format option now respects the -channel argument [`6dc7e94`](https://github.com/ImageMagick/ImageMagick6/commit/6dc7e946ad28bc74f0385f32409382d2c290f6c2)
|
||||
- mean is already computed, don't compute it again [`b1a8609`](https://github.com/ImageMagick/ImageMagick6/commit/b1a86095382b696ffef5a286b3cdb2ecf1599683)
|
||||
- ... [`aebaac6`](https://github.com/ImageMagick/ImageMagick6/commit/aebaac62a29393e35d3c20715056cb74f6792e13)
|
||||
- optimize on grayscale detection [`e38fce1`](https://github.com/ImageMagick/ImageMagick6/commit/e38fce1ef0f7b569ec664a4b228335e34e037ae0)
|
||||
- heap-based buffer overflow in TIFF coder (alert from Hunter Mitchell) [`e1fbcdf`](https://github.com/ImageMagick/ImageMagick6/commit/e1fbcdf3aad96d51db65c1601117396eac665a6d)
|
||||
- timeb.h is deprecated [`827ba53`](https://github.com/ImageMagick/ImageMagick6/commit/827ba5310372558385feb91a03afda829928a25e)
|
||||
- Use new solution that is already upgrade to VS2019. [`b9ca6d9`](https://github.com/ImageMagick/ImageMagick6/commit/b9ca6d96820f7f2278515f6bfb26b72c42e1338b)
|
||||
- eliminate improper assertion [`78c72ee`](https://github.com/ImageMagick/ImageMagick6/commit/78c72ee91c93c4d10f89de781a711bf4e53dfcd9)
|
||||
- grayscale images were not being written properly [`84e8b18`](https://github.com/ImageMagick/ImageMagick6/commit/84e8b18294907a1232b216d89a60008341dfbc5a)
|
||||
- heap-based buffer overflow in TIFF coder (alert from Hunter Mitchell) [`f90a091`](https://github.com/ImageMagick/ImageMagick6/commit/f90a091c7dd12cc53b0999bf49d1c80651534eea)
|
||||
- reset image structure magick member [`e2045ec`](https://github.com/ImageMagick/ImageMagick6/commit/e2045ec83b5f709decf50c762ceac843e749d52e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4059 [`63037e7`](https://github.com/ImageMagick/ImageMagick6/commit/63037e7bbf33574513126f5aef0acf3416146a93)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4059 [`37b4985`](https://github.com/ImageMagick/ImageMagick6/commit/37b49851335e9df91de7cdf763d27768c85c69e3)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36990 [`9aa9170`](https://github.com/ImageMagick/ImageMagick6/commit/9aa91709d2b9ec1b98398e081e2fb67bb7e1718e)
|
||||
- ... [`92a2023`](https://github.com/ImageMagick/ImageMagick6/commit/92a2023362cf5b2e31df3b9331015a3093deb65f)
|
||||
- heap-based buffer overflow in TIFF coder (alert from Hunter Mitchell) [`35b88c9`](https://github.com/ImageMagick/ImageMagick6/commit/35b88c9166bc1b3ce8893f52217bae00d8e2c532)
|
||||
- eliminate compiler warning [`1c9bcc6`](https://github.com/ImageMagick/ImageMagick6/commit/1c9bcc67803f7130afda8f2caa8bd8a5f1999dde)
|
||||
- pending release [`4e5510e`](https://github.com/ImageMagick/ImageMagick6/commit/4e5510e020300678a4ea20a4e35348444981cba5)
|
||||
- Whitespace [`4d1d0a6`](https://github.com/ImageMagick/ImageMagick6/commit/4d1d0a6a6adc8433126ec912c87336c797f92735)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4059 [`54df923`](https://github.com/ImageMagick/ImageMagick6/commit/54df923634871204a7a371b9523ab63d67cc37d1)
|
||||
- pending release [`bf9a427`](https://github.com/ImageMagick/ImageMagick6/commit/bf9a4278c183d2713894d0ff1d4e97232cd2d70e)
|
||||
- pending release [`1e43b29`](https://github.com/ImageMagick/ImageMagick6/commit/1e43b291a5825520860b92acb3f7b52ba6145805)
|
||||
- reduce memory moves [`0132164`](https://github.com/ImageMagick/ImageMagick6/commit/0132164f33ea82daf732f3923c2fb141cb834dcc)
|
||||
- pending release [`d49be7f`](https://github.com/ImageMagick/ImageMagick6/commit/d49be7fbb7667ec214cd00a16145d7f4e3f1606e)
|
||||
- Only run the OpenCL benchmark when OpenCL is enabled. [`a04e6c4`](https://github.com/ImageMagick/ImageMagick6/commit/a04e6c49bdc19d9918d5a588ea3fd95f39dcd379)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/4059 [`41c9434`](https://github.com/ImageMagick/ImageMagick6/commit/41c9434f427bcbba9163f4550cd034a6d8363fb9)
|
||||
- Use & instead. [`8a23eb2`](https://github.com/ImageMagick/ImageMagick6/commit/8a23eb2603186c704f30d4b2f17bdefa5d6822d3)
|
||||
- stop parsing after exception [`44c3bfc`](https://github.com/ImageMagick/ImageMagick6/commit/44c3bfc788dd4c94682093d480c514ab38543a2f)
|
||||
- pending release [`0f1b20c`](https://github.com/ImageMagick/ImageMagick6/commit/0f1b20cf7eaa687847c1da3356961eb44e807911)
|
||||
- stop parsing on exception [`b915afb`](https://github.com/ImageMagick/ImageMagick6/commit/b915afb73148a8da5bca4a018a43c0432873d7fc)
|
||||
|
||||
## [6.9.12-19](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-18...6.9.12-19) - 2021-07-18
|
||||
|
||||
### Commits
|
||||
|
||||
- revert; keep CoreGenesis/CoreTerminus pairs; destroy wand ids [`2f3cc2c`](https://github.com/ImageMagick/ImageMagick6/commit/2f3cc2cf8339f1defd4215efcb320119de6ac1df)
|
||||
- call MagickWandGenesis()/MagickWandTerminus() [`64aef14`](https://github.com/ImageMagick/ImageMagick6/commit/64aef14cc75b3bc0af31bc417060d79dfb6194e0)
|
||||
- call wand genesis / terminus rather than core [`c4f26fb`](https://github.com/ImageMagick/ImageMagick6/commit/c4f26fbfd50bdb47397977758dc770f92b35a4bd)
|
||||
- ... [`45df407`](https://github.com/ImageMagick/ImageMagick6/commit/45df407647856e7b5750767e49885b2f32a29c36)
|
||||
- Fixed writing the iptc information when it is not stored as long. [`f4feb3e`](https://github.com/ImageMagick/ImageMagick6/commit/f4feb3eef7d1013f90babd21dee51736a21be1b2)
|
||||
- install wand.h header that defines DestroyWandIDs() [`c2d788c`](https://github.com/ImageMagick/ImageMagick6/commit/c2d788c52ab9824c938af0a85ae83281d4c9c0a4)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3896 [`f939ee0`](https://github.com/ImageMagick/ImageMagick6/commit/f939ee00031464bd30cc69dcab8777f39ee8fbb8)
|
||||
- ... [`3b491b8`](https://github.com/ImageMagick/ImageMagick6/commit/3b491b852a6f692ebc3ace6fee8ceb7ceb0adde9)
|
||||
- pending release [`c0e73a4`](https://github.com/ImageMagick/ImageMagick6/commit/c0e73a46b330d6f58dd0f5bb5ecf7c9287812acb)
|
||||
- pending release [`e28afaa`](https://github.com/ImageMagick/ImageMagick6/commit/e28afaa4eb6f184689c218debe9ba4874b9f727b)
|
||||
- ... [`d881b80`](https://github.com/ImageMagick/ImageMagick6/commit/d881b800c7f768bb5926e0ad730401bd866865cc)
|
||||
- ... [`d09e86f`](https://github.com/ImageMagick/ImageMagick6/commit/d09e86f7d23784a2e8156ad7341a4221f0034d83)
|
||||
- pending release [`5b9a9db`](https://github.com/ImageMagick/ImageMagick6/commit/5b9a9dbbe0c5b1654ff3185dee96fae0f0514295)
|
||||
- pending release [`1015767`](https://github.com/ImageMagick/ImageMagick6/commit/1015767a1429e3fa67b63853dc67d625171812c1)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3951 [`e924a55`](https://github.com/ImageMagick/ImageMagick6/commit/e924a55afa85eff1780ad78d875f6429a50c4c11)
|
||||
- remove virtual canvas offset from similarity image [`1f974fd`](https://github.com/ImageMagick/ImageMagick6/commit/1f974fd9eb285da31989e97d51fca67648643ef2)
|
||||
- ... [`b847557`](https://github.com/ImageMagick/ImageMagick6/commit/b847557488c072763c2a0ecf62d0cfac5748353b)
|
||||
|
||||
## [6.9.12-18](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-17...6.9.12-18) - 2021-07-17
|
||||
|
||||
### Merged
|
||||
|
||||
- uses the PerceptibleReciprocal() to prevent the divide-by-zero from occurring [`#3194`](https://github.com/ImageMagick/ImageMagick6/pull/3194)
|
||||
|
||||
### Commits
|
||||
|
||||
- Use the new issue templates. [`7c853af`](https://github.com/ImageMagick/ImageMagick6/commit/7c853afa3be12dfff22b34f0d2ddaf15180e66d9)
|
||||
- optimize grayscale detection [`ec9feab`](https://github.com/ImageMagick/ImageMagick6/commit/ec9feabc987df9781c4e89f2ce014b75b02bfd0d)
|
||||
- Corrected getting the image dimensions when identifying a postscript file. [`d624b59`](https://github.com/ImageMagick/ImageMagick6/commit/d624b590d2b1a4dd2d9f6794d6c388ca7b9069db)
|
||||
- Fixed parsing the spot colors of a postscript document. [`ce84a88`](https://github.com/ImageMagick/ImageMagick6/commit/ce84a88592408d25533cd63a58ba7ee1b2b7c4cd)
|
||||
- ... [`74f450e`](https://github.com/ImageMagick/ImageMagick6/commit/74f450e153dccb64bc254fca89318b00f6dd0eda)
|
||||
- system() is not supported under IOS [`b9f3577`](https://github.com/ImageMagick/ImageMagick6/commit/b9f3577b509808187fcb9b4a8955d6327bcd0e09)
|
||||
- The predictor tag should only be set for specific compression types. [`96c9b70`](https://github.com/ImageMagick/ImageMagick6/commit/96c9b7032d4b5cc3703cc32a1d59ab8c64a6a289)
|
||||
- Added option to peek in the byte buffer. [`63bc851`](https://github.com/ImageMagick/ImageMagick6/commit/63bc85166df5b0c14562687252d8050cee1a73fb)
|
||||
- Removed checklist. [`bc06359`](https://github.com/ImageMagick/ImageMagick6/commit/bc06359cf59e33b88ba0199f01ed4b5f1bbe8f6b)
|
||||
- set imaginary component of the complex conjugate to -Ai [`f6b610f`](https://github.com/ImageMagick/ImageMagick6/commit/f6b610f6370b5140b86e50854a0b72dfc4d0dff0)
|
||||
- check for zero demoninator [`e110b81`](https://github.com/ImageMagick/ImageMagick6/commit/e110b81fd38b2e15dc7495699de53df51f4ade91)
|
||||
- Added raqm to the autolinking list. [`756685f`](https://github.com/ImageMagick/ImageMagick6/commit/756685f4111943499a530c4bcf84b55964b8ba00)
|
||||
- Make it more clear that no memory is leaking. [`7f0b16c`](https://github.com/ImageMagick/ImageMagick6/commit/7f0b16c0578766a578cdaa686e891b4812d17848)
|
||||
- Fixed copy paste mistake. [`0416173`](https://github.com/ImageMagick/ImageMagick6/commit/0416173677748e027ac772fa2094174a0a91b6d3)
|
||||
- prevent blow up when standard deviation is 0 [`033df67`](https://github.com/ImageMagick/ImageMagick6/commit/033df67ae2d4ef2dc13952bfc48cbc5bef4b1686)
|
||||
- pending release [`83e0280`](https://github.com/ImageMagick/ImageMagick6/commit/83e0280d488f14cf73f1e85cbf6857a56438f2db)
|
||||
- proper cast [`4ce1321`](https://github.com/ImageMagick/ImageMagick6/commit/4ce1321c497e76e07d6c785840a2c6a0d2c6dbd8)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3925 [`cd274e4`](https://github.com/ImageMagick/ImageMagick6/commit/cd274e439e7bb49d18b1be7617d89f3be91b3188)
|
||||
|
||||
## [6.9.12-17](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-16...6.9.12-17) - 2021-06-25
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`801ffbd`](https://github.com/ImageMagick/ImageMagick6/commit/801ffbdc1a221e7a9947d22efb81101ce7fb2289)
|
||||
- ... [`c1cb4d2`](https://github.com/ImageMagick/ImageMagick6/commit/c1cb4d26d533aa137cc5280aa6370f8d61150a1c)
|
||||
- pending release [`fdb4ff6`](https://github.com/ImageMagick/ImageMagick6/commit/fdb4ff6575cb1012397a9a9e03f45924d56fd8fa)
|
||||
- fix memory corruption in ConcatenateStringInfo [`7b5d5d9`](https://github.com/ImageMagick/ImageMagick6/commit/7b5d5d943fec12ccd167a6fed11758c609cb3275)
|
||||
- ... [`8c99db4`](https://github.com/ImageMagick/ImageMagick6/commit/8c99db4d683f3fd1a4a89b85b3dc5c4b2c7295f4)
|
||||
|
||||
## [6.9.12-16](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-15...6.9.12-16) - 2021-06-20
|
||||
|
||||
### Commits
|
||||
|
||||
- ver allocate memory, typically used when concatentating strings [`73a59dc`](https://github.com/ImageMagick/ImageMagick6/commit/73a59dcd4eaae3a0cec565abda9c0dcb070c734a)
|
||||
- ... [`dafa983`](https://github.com/ImageMagick/ImageMagick6/commit/dafa983fea7c9b0160c375435c53e83bc436b3c8)
|
||||
- ... [`8aea6ca`](https://github.com/ImageMagick/ImageMagick6/commit/8aea6ca9f5363b4f5d6caaaa1df2c87a4bc43c82)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3844 [`fdf3836`](https://github.com/ImageMagick/ImageMagick6/commit/fdf38365635ec2e31d1c5294f1fb22a34917f2d4)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35322 [`40f9bcd`](https://github.com/ImageMagick/ImageMagick6/commit/40f9bcd0f47d24eae4a9c3d542273af586938695)
|
||||
- Revert patch that automatically changes the image orientation. [`086c8ee`](https://github.com/ImageMagick/ImageMagick6/commit/086c8eebf8df72086f2370b1e5c9ec72becaf89a)
|
||||
- Use the same typecast as in ImageMagick 7. [`d02e016`](https://github.com/ImageMagick/ImageMagick6/commit/d02e016daae2768e7abfc034c4b81d8fb3863617)
|
||||
- pending release [`25aa96d`](https://github.com/ImageMagick/ImageMagick6/commit/25aa96dee935a052bd0b0893780bb5ea6bc4ecb4)
|
||||
- pending release [`17d7b4b`](https://github.com/ImageMagick/ImageMagick6/commit/17d7b4bad2ca7fc7374164f1c40cb6f8282c4afb)
|
||||
- pending release [`46762e1`](https://github.com/ImageMagick/ImageMagick6/commit/46762e1b539aba1bfc7f39f6027a23a7cf84d276)
|
||||
- ... [`d259da5`](https://github.com/ImageMagick/ImageMagick6/commit/d259da5de84df842780e79b5994a8d95b16c488c)
|
||||
|
||||
## [6.9.12-15](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-14...6.9.12-15) - 2021-06-12
|
||||
|
||||
### Commits
|
||||
|
||||
- Corrected writing the icc profile in a PDF file. [`5a73bdc`](https://github.com/ImageMagick/ImageMagick6/commit/5a73bdcc68d2b1a1a14df1324e0178778f7b9030)
|
||||
- Write the number of channels of the color profile instead of the image (#2070). [`af88978`](https://github.com/ImageMagick/ImageMagick6/commit/af88978d2d35a047e1d7daa5a24df69e032db65a)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3786 [`ed858f9`](https://github.com/ImageMagick/ImageMagick6/commit/ed858f9af9797ddd07c818c0c84cfe1121d7fd9b)
|
||||
- ... [`ece4978`](https://github.com/ImageMagick/ImageMagick6/commit/ece4978c35d73eee4eda064b8f429a6ad42a3bec)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/3813 [`dabbe44`](https://github.com/ImageMagick/ImageMagick6/commit/dabbe4450429779f526b9eb3ba29df9ff0653689)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3765 [`a8c277e`](https://github.com/ImageMagick/ImageMagick6/commit/a8c277e07d1a0c92179f830e9399ee7b8cc15931)
|
||||
- Fixed memory leak when it failed to apply ICC color profile [`1d4b8f4`](https://github.com/ImageMagick/ImageMagick6/commit/1d4b8f499985f5b576b53b7b478a9c5ab82116d1)
|
||||
- ... [`637a850`](https://github.com/ImageMagick/ImageMagick6/commit/637a850cf7f3d87e35041b82ee6305503b996ea6)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3818 [`b21457a`](https://github.com/ImageMagick/ImageMagick6/commit/b21457a7eb9cb4c2f7c497b36a8efdab71beb4e6)
|
||||
- When the compression is OJPEG the colorspace should not be changed to YCbCr. [`24fa0a8`](https://github.com/ImageMagick/ImageMagick6/commit/24fa0a82bdde4bec9d85ba9a59aebc5d83f17743)
|
||||
- pending release [`15126f0`](https://github.com/ImageMagick/ImageMagick6/commit/15126f081300bac271947eb5dc21ecda6e85b070)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35024 [`cde1733`](https://github.com/ImageMagick/ImageMagick6/commit/cde173361e901f957e56640fe03f59e78d92168b)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3818 [`4512ff0`](https://github.com/ImageMagick/ImageMagick6/commit/4512ff04e3bb51874129d4857734e235f52b974d)
|
||||
- pending release [`f1893ff`](https://github.com/ImageMagick/ImageMagick6/commit/f1893ff113904f1062fbec74345e01fc708d0dba)
|
||||
|
||||
## [6.9.12-14](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-12...6.9.12-14) - 2021-05-31
|
||||
|
||||
### Commits
|
||||
|
||||
- update copyright [`e65639e`](https://github.com/ImageMagick/ImageMagick6/commit/e65639eace3619b600881c0722a9f5f28b2d0f46)
|
||||
- ... [`14ea894`](https://github.com/ImageMagick/ImageMagick6/commit/14ea8946956a0b2be3c2c4acc73442ddfddee95a)
|
||||
- ... [`abd606b`](https://github.com/ImageMagick/ImageMagick6/commit/abd606b33eae106296b660e047adfc1e933ef900)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3687 [`274d848`](https://github.com/ImageMagick/ImageMagick6/commit/274d8481b11054b0c15c3b118e0fd2bb57919119)
|
||||
- Removed travis build. [`bdff671`](https://github.com/ImageMagick/ImageMagick6/commit/bdff671dc524e5faae69fa9dfe53b6af7d7d6ffc)
|
||||
- update CSS [`502d738`](https://github.com/ImageMagick/ImageMagick6/commit/502d73855661295eec94519ea83a1c31a1804d1a)
|
||||
- Always use a wildcard in NTOpenDirectory. [`8305ee3`](https://github.com/ImageMagick/ImageMagick6/commit/8305ee3125b1d6cb9e6fb6978fae5a6ee6cb19f6)
|
||||
- Added missing status checks. [`7b2c55c`](https://github.com/ImageMagick/ImageMagick6/commit/7b2c55c2280323956b7c70909775fc81cecf98bd)
|
||||
- The path should not end in a backslash according to the MSDN documentation. [`8533847`](https://github.com/ImageMagick/ImageMagick6/commit/8533847ff7cfd9fb7de549d383179a65a7019ae9)
|
||||
- ... [`e53f1fd`](https://github.com/ImageMagick/ImageMagick6/commit/e53f1fd02a97f521c4b26faf439b7b4bb55af58c)
|
||||
- ... [`a792ea6`](https://github.com/ImageMagick/ImageMagick6/commit/a792ea62e0d72b86c2bb8502dec17f6e6d15c227)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3653 [`8e9b75e`](https://github.com/ImageMagick/ImageMagick6/commit/8e9b75ea13bf007724d5e6dd5625f9af7d6098fa)
|
||||
- ... [`5e392ec`](https://github.com/ImageMagick/ImageMagick6/commit/5e392ec12363fdfd8fe9b5d98bbead89f560dd78)
|
||||
- Fixed reading and writing the XMP chunk in a WebP image. [`62b736a`](https://github.com/ImageMagick/ImageMagick6/commit/62b736a9a6d7e736fabaaf728c8ecaaacadc2c7d)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3676 [`9d8e861`](https://github.com/ImageMagick/ImageMagick6/commit/9d8e86156f0f2c949623bfbd5c78d6c89a7c5467)
|
||||
- Removed unused variable. [`5b44db7`](https://github.com/ImageMagick/ImageMagick6/commit/5b44db70ca28b8f88ab5f9104570e85c4e16e74f)
|
||||
- https://github.com/ImageMagick/ImageMagick/pull/3749 [`6ba4b42`](https://github.com/ImageMagick/ImageMagick6/commit/6ba4b42dc9269f301952c1ec2dd0fb782834e00d)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/3583 [`d780ce0`](https://github.com/ImageMagick/ImageMagick6/commit/d780ce0a931d809e4452b7b3c8181806baeb1e8c)
|
||||
- ... [`1b85287`](https://github.com/ImageMagick/ImageMagick6/commit/1b85287582cd72bcb128800d50878dd33a37ae65)
|
||||
- pending release [`6f1745f`](https://github.com/ImageMagick/ImageMagick6/commit/6f1745f5d593df4c3b98ec763c6b690abc1dec97)
|
||||
- pending release [`f4efad9`](https://github.com/ImageMagick/ImageMagick6/commit/f4efad954ad505c71d17fa40f94af691d1492555)
|
||||
- Silence mingw warnings. [`a4ec89d`](https://github.com/ImageMagick/ImageMagick6/commit/a4ec89d233d6d5e03d558b14989322db7ec5f413)
|
||||
- pending release [`7f8bf2f`](https://github.com/ImageMagick/ImageMagick6/commit/7f8bf2fe0325f577ab518fda227d068237065ac6)
|
||||
- The image type should not be changed when the image already has the correct type. [`8f74220`](https://github.com/ImageMagick/ImageMagick6/commit/8f74220f4f1dfdb0841f055402f19e219348af56)
|
||||
- NULL color name is acceptable [`d5a3cf7`](https://github.com/ImageMagick/ImageMagick6/commit/d5a3cf7270d1ef509ef61a55f51e33c1e894854b)
|
||||
- https://github.com/ImageMagick/ImageMagick/pull/3749 [`3233cab`](https://github.com/ImageMagick/ImageMagick6/commit/3233cab9b2a623626fe6d414b49dbe1a5b732a2d)
|
||||
- ... [`c75ae77`](https://github.com/ImageMagick/ImageMagick6/commit/c75ae771a00c38b757c5ef4b424b51e761b02552)
|
||||
- pending release [`8947663`](https://github.com/ImageMagick/ImageMagick6/commit/89476634dafdafdf86573f75c6a34743d5805641)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3690 [`2f1c004`](https://github.com/ImageMagick/ImageMagick6/commit/2f1c00490617ce067d8319866c8022411d17f2a4)
|
||||
- eliminate heap buffer overflow vulnerability, thanks to ZhangJiaxing (@r0fm1a) from Codesafe Team of Legendsec at Qi'anxin Group [`b307bca`](https://github.com/ImageMagick/ImageMagick6/commit/b307bcadcdf6ea6819951ac1786b7904f27b25c6)
|
||||
- Moved definition of the define to this header file. [`5e2af4c`](https://github.com/ImageMagick/ImageMagick6/commit/5e2af4c542d0fee760eb9e2e0e3acd333156da0f)
|
||||
- https://github.com/ImageMagick/ImageMagick/pull/3685/ [`2ac82aa`](https://github.com/ImageMagick/ImageMagick6/commit/2ac82aa7f502c779cbabd7f7c06d39eedcbfb042)
|
||||
|
||||
## [6.9.12-12](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-11...6.9.12-12) - 2021-05-09
|
||||
|
||||
### Commits
|
||||
|
||||
- improve exception testing [`94026fb`](https://github.com/ImageMagick/ImageMagick6/commit/94026fbfb045d27576799d84ee63320ba7cbc7aa)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`ed78be2`](https://github.com/ImageMagick/ImageMagick6/commit/ed78be2e62accb8ac0747fd2a72c9c52758b2f3a)
|
||||
- support dither:diffusion-amount define for Riemersma dithering [`0d0f402`](https://github.com/ImageMagick/ImageMagick6/commit/0d0f402452dda40667926548882d18d2d336e141)
|
||||
- ... [`5ec7ae6`](https://github.com/ImageMagick/ImageMagick6/commit/5ec7ae6d969667bb78d238649dd422e8f8441436)
|
||||
- ... [`dd9b62d`](https://github.com/ImageMagick/ImageMagick6/commit/dd9b62d7ca80ffe5eebb34befc727ab3e59dc10b)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`8aa401e`](https://github.com/ImageMagick/ImageMagick6/commit/8aa401e00e229f0cb55ac733b9aa03c8bab884f5)
|
||||
- pending release [`0d11539`](https://github.com/ImageMagick/ImageMagick6/commit/0d11539c266133971246eb2d0d49e626a43bcdf0)
|
||||
- ... [`a5fec66`](https://github.com/ImageMagick/ImageMagick6/commit/a5fec668b59d0a725d96d56fae1b4864073f5b86)
|
||||
|
||||
## [6.9.12-11](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-10...6.9.12-11) - 2021-05-04
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`c46cd9f`](https://github.com/ImageMagick/ImageMagick6/commit/c46cd9fe551b567fb7b40bba052d3502d00f0f30)
|
||||
- Replace tabs with spaces. [`b9d006e`](https://github.com/ImageMagick/ImageMagick6/commit/b9d006e0089fad6afab71528d34f00aa401e4023)
|
||||
- Generate threshold-map.h instead. [`d4c3361`](https://github.com/ImageMagick/ImageMagick6/commit/d4c33614def7874b55607238f8fd83c8bbddea48)
|
||||
- Add full threshold map [`c9753f9`](https://github.com/ImageMagick/ImageMagick6/commit/c9753f9113014a3d0283e8e4332447e7d1e5ed52)
|
||||
- improve method name [`5d112e0`](https://github.com/ImageMagick/ImageMagick6/commit/5d112e0673ccc6f1632f6ff63c62d5a0bf6225e7)
|
||||
- ... [`2316ca6`](https://github.com/ImageMagick/ImageMagick6/commit/2316ca67f6a6997b131aef292d33a1c38ee5cccf)
|
||||
- ... [`3df3254`](https://github.com/ImageMagick/ImageMagick6/commit/3df32542e617b7df3291dded38a4825e926d8335)
|
||||
- Use ExceptionInfo instead of letting libraw print to stderr. [`8462661`](https://github.com/ImageMagick/ImageMagick6/commit/8462661321389bab113b76bc74e0c27448914792)
|
||||
- Corrected check in the TIFF decoder. [`a260de2`](https://github.com/ImageMagick/ImageMagick6/commit/a260de22e0676d0497ff780f0ccdbb795c05141b)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`caee165`](https://github.com/ImageMagick/ImageMagick6/commit/caee16574b1cce8f45cf01f63ea7a8988cbfe5fd)
|
||||
- revert comments [`7d8a3b7`](https://github.com/ImageMagick/ImageMagick6/commit/7d8a3b762f3a9b1171d904da52293fe43cd8e0cb)
|
||||
- pending release [`1ba0774`](https://github.com/ImageMagick/ImageMagick6/commit/1ba077420bd1a69c5dd5daed2c4a8736240ef256)
|
||||
- ... [`e670f7f`](https://github.com/ImageMagick/ImageMagick6/commit/e670f7fc527eafe79134eb81786179f1760d9ec7)
|
||||
- fix Makefile separator exception [`0d00ae7`](https://github.com/ImageMagick/ImageMagick6/commit/0d00ae7e3afb9e5022bb00ba042b5e5ee71c6bc3)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3468 [`5c22ac6`](https://github.com/ImageMagick/ImageMagick6/commit/5c22ac68a5077995db1ce40ddf37ea6ba14e3e29)
|
||||
- Use magick instead of MagickCore. [`38f6779`](https://github.com/ImageMagick/ImageMagick6/commit/38f67793a6c37263e4aaffd8b9ef3c2510859836)
|
||||
- Another attempt. [`816071e`](https://github.com/ImageMagick/ImageMagick6/commit/816071e70ea0dff2ec939dcb8a6b818f25e83d4f)
|
||||
- fix names [`fbb8139`](https://github.com/ImageMagick/ImageMagick6/commit/fbb8139444e7d2debede07ceec91295243fb7619)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33831 [`307f11e`](https://github.com/ImageMagick/ImageMagick6/commit/307f11e997b452a2a0a24abcf52eff16f4e11119)
|
||||
- cosmetic [`f944c0e`](https://github.com/ImageMagick/ImageMagick6/commit/f944c0efc98c5c6f7d6858666d6e3b207ad73e03)
|
||||
- Corrected typo. [`3d0d0e0`](https://github.com/ImageMagick/ImageMagick6/commit/3d0d0e0564339cf93da53852fa50005b55890e87)
|
||||
- ... [`b3f69a1`](https://github.com/ImageMagick/ImageMagick6/commit/b3f69a17a508788164a973ed8b9f10264b776f8b)
|
||||
- pending release [`930161d`](https://github.com/ImageMagick/ImageMagick6/commit/930161d603e2b65f363a10ba142e2ac732e28302)
|
||||
|
||||
## [6.9.12-10](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-9...6.9.12-10) - 2021-04-28
|
||||
|
||||
### Merged
|
||||
|
||||
- Fix line endings in Geometry.h to LF. [`#149`](https://github.com/ImageMagick/ImageMagick6/pull/149)
|
||||
- Fix incorrect client_data pointer being set in libjpeg context. [`#152`](https://github.com/ImageMagick/ImageMagick6/pull/152)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix incorrect client_data pointer being set in libjpeg context. (#152) [`#150`](https://github.com/ImageMagick/ImageMagick6/issues/150) [`#151`](https://github.com/ImageMagick/ImageMagick6/issues/151)
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`c770f50`](https://github.com/ImageMagick/ImageMagick6/commit/c770f508dea2e72791845e745696092f3e794a58)
|
||||
- check image is not NULL before dereferencing [`5ee7e3e`](https://github.com/ImageMagick/ImageMagick6/commit/5ee7e3eae5a0f4c06969c5b99a0a605901c0eac1)
|
||||
- ... [`99cbc9f`](https://github.com/ImageMagick/ImageMagick6/commit/99cbc9f2542b9857c8abe580870b2b7a59e60731)
|
||||
- pending release [`fea001e`](https://github.com/ImageMagick/ImageMagick6/commit/fea001e31a471c1e6605aa6e6ae97fb554a0e784)
|
||||
- pending release [`370ce4c`](https://github.com/ImageMagick/ImageMagick6/commit/370ce4c7e2f6c04a672ca0b5ebb05acb490e31e9)
|
||||
|
||||
## [6.9.12-9](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-8...6.9.12-9) - 2021-04-24
|
||||
|
||||
### Commits
|
||||
|
||||
- cosmetic [`3832fa1`](https://github.com/ImageMagick/ImageMagick6/commit/3832fa11c51785a611e7a7cc9c57073221ed7833)
|
||||
- ... [`878f631`](https://github.com/ImageMagick/ImageMagick6/commit/878f6315caa7d8b9f0c616147e71a2f2b25b1756)
|
||||
- cosmetic [`47e1eab`](https://github.com/ImageMagick/ImageMagick6/commit/47e1eabbc7736a08aed1ec225a07357f65d19ede)
|
||||
- ... [`99b82fe`](https://github.com/ImageMagick/ImageMagick6/commit/99b82feded146a666b808c977db248c0e78bc757)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3571 [`68a0f3f`](https://github.com/ImageMagick/ImageMagick6/commit/68a0f3f8b8e90190c78bc65403fc81192fb3da59)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33466 [`6cf7fd8`](https://github.com/ImageMagick/ImageMagick6/commit/6cf7fd8e84aedcdfb125120b230f5a1dcf781169)
|
||||
- ... [`181125f`](https://github.com/ImageMagick/ImageMagick6/commit/181125f67ecf9ac57adef1db861181d8d6adbe70)
|
||||
- ... [`969b02d`](https://github.com/ImageMagick/ImageMagick6/commit/969b02d7a66e0d74a5290183e334995586e4a3dd)
|
||||
- Corrected ChangeLog. [`165f89f`](https://github.com/ImageMagick/ImageMagick6/commit/165f89f5c3cdd05a49c08c001187c8ccfb5d6e58)
|
||||
- ... [`fb64736`](https://github.com/ImageMagick/ImageMagick6/commit/fb647360465898972581c5a44d92f05040c61bbf)
|
||||
- pending release [`e9740ab`](https://github.com/ImageMagick/ImageMagick6/commit/e9740ab2ea9ce835003966551ceebcae4ce16ff1)
|
||||
- ... [`6fd9c48`](https://github.com/ImageMagick/ImageMagick6/commit/6fd9c48d18522fc739988c635b4f230f5a9553a9)
|
||||
- Corrected typo. [`c8c3cf8`](https://github.com/ImageMagick/ImageMagick6/commit/c8c3cf8a1d7f93de7127606e5ccc0f2068216322)
|
||||
|
||||
## [6.9.12-8](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-7...6.9.12-8) - 2021-04-17
|
||||
|
||||
### Commits
|
||||
|
||||
- latest automake/autoconf [`1fb5916`](https://github.com/ImageMagick/ImageMagick6/commit/1fb5916a9010c993a6e77613310828e950c8959f)
|
||||
- ... [`24030ed`](https://github.com/ImageMagick/ImageMagick6/commit/24030ed4a3009bac808989e4142942074308bd33)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3549 [`0962d40`](https://github.com/ImageMagick/ImageMagick6/commit/0962d402b0af0d31d7267bb82f5460c53c54518e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`0fcebd3`](https://github.com/ImageMagick/ImageMagick6/commit/0fcebd3e7a382830a8e56b98b3f67e06b4beadb3)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33350 [`0eccd35`](https://github.com/ImageMagick/ImageMagick6/commit/0eccd3556a8c456239a49f9064381ddc3e28476e)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33232 [`e699f55`](https://github.com/ImageMagick/ImageMagick6/commit/e699f559dfa912cf979893ab2cde9a0695218c30)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3540 [`cd7f9fb`](https://github.com/ImageMagick/ImageMagick6/commit/cd7f9fb7751b0d59d5a74b12d971155caad5a792)
|
||||
- pending release [`e65db11`](https://github.com/ImageMagick/ImageMagick6/commit/e65db11090a270d7200adac080f623a7e75b1e96)
|
||||
- pending release [`e06e7ff`](https://github.com/ImageMagick/ImageMagick6/commit/e06e7ffbf1fa16039754558eac75a917bd827393)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3537 [`5b0acdb`](https://github.com/ImageMagick/ImageMagick6/commit/5b0acdb5047fd322ea9ba3cbf7fe0718e3cda0af)
|
||||
- write tiff colormapped images with an alpha channel as PHOTOMETRIC_RGB [`270494f`](https://github.com/ImageMagick/ImageMagick6/commit/270494f4ba392f230b2e816667416e5ac638e275)
|
||||
|
||||
## [6.9.12-7](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-6...6.9.12-7) - 2021-04-11
|
||||
|
||||
### Merged
|
||||
|
||||
- fix perl syntax [`#144`](https://github.com/ImageMagick/ImageMagick6/pull/144)
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`b9a79ba`](https://github.com/ImageMagick/ImageMagick6/commit/b9a79ba19226ea0d5f81b61bb06b4b84f1bb7bcd)
|
||||
- add a nonce to the signature generation [`d9600ec`](https://github.com/ImageMagick/ImageMagick6/commit/d9600ec25644b74d8be1bd432f280b2467c5e175)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33137 [`d94de13`](https://github.com/ImageMagick/ImageMagick6/commit/d94de132dce98a02dce3451dfc014d2286fa0d43)
|
||||
- constrain sub-image list [`c4392ae`](https://github.com/ImageMagick/ImageMagick6/commit/c4392aee303fba6d5e813f8c2ae1b67c19b438cb)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`bec4e2d`](https://github.com/ImageMagick/ImageMagick6/commit/bec4e2dabf96dd93ef0ca7bb384521acdcb4be1e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`d4f04b4`](https://github.com/ImageMagick/ImageMagick6/commit/d4f04b4dfb783996b8f48c28d64c04ca8b8cd542)
|
||||
- revert patch [`3415a1d`](https://github.com/ImageMagick/ImageMagick6/commit/3415a1db1c4dfd8dc096f45c80f647e047da0cd8)
|
||||
- pending release [`e183af8`](https://github.com/ImageMagick/ImageMagick6/commit/e183af8ec3d8ce2d36e55beda63535052ff429ed)
|
||||
- ... [`e3ad231`](https://github.com/ImageMagick/ImageMagick6/commit/e3ad2313517d78a96b5bcfce1cd4ce37c9df8dba)
|
||||
- https://github.com/ImageMagick/ImageMagick6/security/code-scanning/5?query=ref%3Arefs%2Fheads%2Fmain [`822e476`](https://github.com/ImageMagick/ImageMagick6/commit/822e4768034198ff0bcc41b551462295ca5baec6)
|
||||
- https://github.com/ImageMagick/ImageMagick6/issues/145 [`bc7f4f5`](https://github.com/ImageMagick/ImageMagick6/commit/bc7f4f54206f2053a45959e07704c7fc657e07aa)
|
||||
- ... [`0dbacf8`](https://github.com/ImageMagick/ImageMagick6/commit/0dbacf8c67e2788f3d13b6d9b442b72bfad2d055)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3520 [`4c0a1d5`](https://github.com/ImageMagick/ImageMagick6/commit/4c0a1d5b7a230b84e2d420c592ce7bc355ebd785)
|
||||
- pending release [`8608fb1`](https://github.com/ImageMagick/ImageMagick6/commit/8608fb14228480364cda4080c1b2d3ed118d8b8d)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3469 [`75c05e1`](https://github.com/ImageMagick/ImageMagick6/commit/75c05e1a2b1763712a6d9ca9de237c0d9198647e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3469 [`89f9691`](https://github.com/ImageMagick/ImageMagick6/commit/89f9691ab4fdfbb8cacbe6718a0e3b911982b0ff)
|
||||
- pending release [`a14972b`](https://github.com/ImageMagick/ImageMagick6/commit/a14972b0323163a8a41e4e34213da2b277bce372)
|
||||
- pending release [`b37dd2c`](https://github.com/ImageMagick/ImageMagick6/commit/b37dd2c732634c98c0beef253f3e03216cdb3fc0)
|
||||
|
||||
## [6.9.12-6](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-5...6.9.12-6) - 2021-04-03
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`312df44`](https://github.com/ImageMagick/ImageMagick6/commit/312df44858c91c2b43c07f7bd7b61cea7332d31f)
|
||||
- revert patch [`7703d3b`](https://github.com/ImageMagick/ImageMagick6/commit/7703d3b2c13e56cc7fe7ca004228e4e2d9b8067f)
|
||||
- prevent undefined-behavior issue reported by Hardik [`798838f`](https://github.com/ImageMagick/ImageMagick6/commit/798838f31c0112c10491bf2cf2a4d084be90e26f)
|
||||
- ... [`f2a5d86`](https://github.com/ImageMagick/ImageMagick6/commit/f2a5d8646472e4bc5cd0a18546db0a29d3b7795c)
|
||||
- pending release [`328bd1a`](https://github.com/ImageMagick/ImageMagick6/commit/328bd1a082a497239938910b4bff8b9bcc2cf768)
|
||||
- pending release [`0f40ca2`](https://github.com/ImageMagick/ImageMagick6/commit/0f40ca207b30abfdd9e7c8868e6005c137c032b7)
|
||||
- https://github.com/ImageMagick/ImageMagick/security/code-scanning/30 [`cbc076e`](https://github.com/ImageMagick/ImageMagick6/commit/cbc076e95697faed2cfb1abcd60693b859135330)
|
||||
- ... [`6c4bc78`](https://github.com/ImageMagick/ImageMagick6/commit/6c4bc786e900ef6ac08483d1cbe963ed3210eddf)
|
||||
- Added missing null check. [`3f8f861`](https://github.com/ImageMagick/ImageMagick6/commit/3f8f8611b5cc7ba945eacc17ad801840b423c2c6)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3469 [`fbecaf0`](https://github.com/ImageMagick/ImageMagick6/commit/fbecaf01e52c45465d2cfad8272bc578e469c953)
|
||||
- pending release [`fd23993`](https://github.com/ImageMagick/ImageMagick6/commit/fd23993f35fbfb48353bdcf16da1767f13eb4e71)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3469 [`f8e4322`](https://github.com/ImageMagick/ImageMagick6/commit/f8e4322d169b0db00ca438c68bed0f4b5c5cabb5)
|
||||
- pending release [`7aab092`](https://github.com/ImageMagick/ImageMagick6/commit/7aab092ac4e77ec6d96fcfe74c53eaf3e6cf159d)
|
||||
- pending release [`0e74340`](https://github.com/ImageMagick/ImageMagick6/commit/0e74340c0adaa4370e971079c654fe405b57e607)
|
||||
|
||||
## [6.9.12-5](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-4...6.9.12-5) - 2021-03-28
|
||||
|
||||
### Commits
|
||||
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3428 [`4f47d5f`](https://github.com/ImageMagick/ImageMagick6/commit/4f47d5f43e7a776cb615433867945f86a556ae51)
|
||||
- ... [`9a4bc34`](https://github.com/ImageMagick/ImageMagick6/commit/9a4bc34b4b985e7cf604dc58691e64c576d8c3bd)
|
||||
- eliminate C++ compile exception [`adda0fe`](https://github.com/ImageMagick/ImageMagick6/commit/adda0fe816d5098691aeec1b690d5178d4fe2a17)
|
||||
- fix handling of non-square images with -fft option [`ffa0d49`](https://github.com/ImageMagick/ImageMagick6/commit/ffa0d49a7556be8f5e9ebf9c14096e5a6102bff8)
|
||||
- Disable OpenCL by default. [`9a5b074`](https://github.com/ImageMagick/ImageMagick6/commit/9a5b07493a639c063caaac334b2e664c2484df7d)
|
||||
- latest beta release [`4981820`](https://github.com/ImageMagick/ImageMagick6/commit/498182048b243c1a20891edb69545832c8d17d80)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32322 [`c8f2595`](https://github.com/ImageMagick/ImageMagick6/commit/c8f25953ad1dd38a8b2d92738f0f742ad7e0bce7)
|
||||
- ... [`3e34aa8`](https://github.com/ImageMagick/ImageMagick6/commit/3e34aa8bdf295e0a9d1630eab6c45cbdc2d90d4f)
|
||||
- pending release [`8dc8e09`](https://github.com/ImageMagick/ImageMagick6/commit/8dc8e090e29c15161de42b62935b706a11e53477)
|
||||
- Throw exception when no exception was raised but status was false (#3432). [`512668d`](https://github.com/ImageMagick/ImageMagick6/commit/512668dfd92b20d0d08b91d62b422d8262573281)
|
||||
- fix c++ compiler exception [`0ec46fc`](https://github.com/ImageMagick/ImageMagick6/commit/0ec46fc805a5e7a4056b9614c7a994bfb39e53b0)
|
||||
- eliminate compiler warning [`6a5d357`](https://github.com/ImageMagick/ImageMagick6/commit/6a5d3575487487f2703383338bd17c8c25068f19)
|
||||
- pending release [`0be2e6a`](https://github.com/ImageMagick/ImageMagick6/commit/0be2e6a5063613c1ed795a863916ccc4481514ce)
|
||||
|
||||
## [6.9.12-4](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-3...6.9.12-4) - 2021-03-20
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`8a98e9f`](https://github.com/ImageMagick/ImageMagick6/commit/8a98e9ff9ee7455551aff6981b5d8503c507bfbc)
|
||||
- ... [`b7ed95d`](https://github.com/ImageMagick/ImageMagick6/commit/b7ed95d47f9a22fac2ab45769d7144fa988429ed)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31872 [`2a56e44`](https://github.com/ImageMagick/ImageMagick6/commit/2a56e447a4a60a4b89fc8be0410a6db39d5e3de3)
|
||||
- ... [`06d7298`](https://github.com/ImageMagick/ImageMagick6/commit/06d729858570caa124a24887cf723fe9679881d4)
|
||||
- ... [`b13e1a8`](https://github.com/ImageMagick/ImageMagick6/commit/b13e1a86fdfc92aa7aa04bedbfa2e43f8c216667)
|
||||
- pending release [`9b40562`](https://github.com/ImageMagick/ImageMagick6/commit/9b405621909fa2e67170178f795a115ddbe9e1db)
|
||||
- ... [`fa69ed6`](https://github.com/ImageMagick/ImageMagick6/commit/fa69ed6f43ca120d9dfb5570330602de6badcf90)
|
||||
- ... [`21991f7`](https://github.com/ImageMagick/ImageMagick6/commit/21991f726e6a7505bf14f593033cc75533c8b783)
|
||||
- https://github.com/ImageMagick/ImageMagick/discussions/3389 [`df6b526`](https://github.com/ImageMagick/ImageMagick6/commit/df6b5268be37616ab479b833fa78951a3bd4e8a1)
|
||||
- ... [`2204eb5`](https://github.com/ImageMagick/ImageMagick6/commit/2204eb57ae00b005b39165a47b8984eac01600a5)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28891 [`f940ecb`](https://github.com/ImageMagick/ImageMagick6/commit/f940ecb921b7ab83da320334349f0cde1ff7f3e6)
|
||||
- avoid omp deadlock [`99ac197`](https://github.com/ImageMagick/ImageMagick6/commit/99ac1977da0883b78cd4e9b763f267e8bce389e8)
|
||||
- pending release [`4ef5c73`](https://github.com/ImageMagick/ImageMagick6/commit/4ef5c73c83203e93b60a092e3bc74697a3310c7f)
|
||||
- ... [`6d5f5d8`](https://github.com/ImageMagick/ImageMagick6/commit/6d5f5d8892fa316aad710521792d23fc7c783734)
|
||||
|
||||
## [6.9.12-3](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-2...6.9.12-3) - 2021-03-06
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`0370b8e`](https://github.com/ImageMagick/ImageMagick6/commit/0370b8e16fd3d7900005040d1663d676268ab1b3)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3332 [`072d7b1`](https://github.com/ImageMagick/ImageMagick6/commit/072d7b10dbe74d1cf4ec0d008990c1a28c076f9e)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3334 [`1b3585f`](https://github.com/ImageMagick/ImageMagick6/commit/1b3585fb7adb4ced6609d58ce9c9feb43dffeaaf)
|
||||
- ... [`c51b249`](https://github.com/ImageMagick/ImageMagick6/commit/c51b2495fcfddc4b77908e2034ca1877c3b4a8bf)
|
||||
- pending release [`4a83315`](https://github.com/ImageMagick/ImageMagick6/commit/4a833158dd16e127e3ca042baed6b449630ec5e2)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3331 [`4eafab8`](https://github.com/ImageMagick/ImageMagick6/commit/4eafab89a2742865d770857a9d7434993f65ae6b)
|
||||
- slight adjustment to D65 illuminant [`1df11cf`](https://github.com/ImageMagick/ImageMagick6/commit/1df11cf4efb748e55d7366f46c6e3a847a742487)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3340 [`448f927`](https://github.com/ImageMagick/ImageMagick6/commit/448f9271ef479569fc46583b9aa4ddc5c962d867)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3333 [`366c970`](https://github.com/ImageMagick/ImageMagick6/commit/366c9708a7ca1256ee03d0d4addb2690ed42273f)
|
||||
- ... [`aa77b65`](https://github.com/ImageMagick/ImageMagick6/commit/aa77b657b123bf92843f96c610b85e1a389e8226)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3337 [`4bf64fd`](https://github.com/ImageMagick/ImageMagick6/commit/4bf64fdd786728f372e8a701a663caa2774e7a23)
|
||||
- ... [`522b4a3`](https://github.com/ImageMagick/ImageMagick6/commit/522b4a3e5bd272873cdc81aa5fdffdc4c520d588)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3335 [`ad492c7`](https://github.com/ImageMagick/ImageMagick6/commit/ad492c7ed4cf1cf285a7f6e2ee5a1e7cf24e73b2)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3336 [`5d33b8d`](https://github.com/ImageMagick/ImageMagick6/commit/5d33b8df73b0b1e40ee3fb7a334d28d929ae903c)
|
||||
- ... [`c498edc`](https://github.com/ImageMagick/ImageMagick6/commit/c498edcef55dea47d6c3c4f2636c467343299ec2)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3338 [`4b5e026`](https://github.com/ImageMagick/ImageMagick6/commit/4b5e026c704d777efe9c2ead5dd68ca4fe3b2aa1)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3339 [`9a94877`](https://github.com/ImageMagick/ImageMagick6/commit/9a94877f7823b0b8a41d50638dd105229d91fa89)
|
||||
|
||||
## [6.9.12-2](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-1...6.9.12-2) - 2021-02-27
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`c8d0040`](https://github.com/ImageMagick/ImageMagick6/commit/c8d0040f8505ee16266dd57b3abda80d7f19fead)
|
||||
- possible divide by zero + clear buffers [`e53e24b`](https://github.com/ImageMagick/ImageMagick6/commit/e53e24b078f7fa586f9cc910491b8910f5bdad2e)
|
||||
- ... [`d945f43`](https://github.com/ImageMagick/ImageMagick6/commit/d945f43d0a103ec4af50816aab54ab3d3b574543)
|
||||
- check that image exists before we destroy it [`3418473`](https://github.com/ImageMagick/ImageMagick6/commit/34184739956fd739735d364ec5b15c2ee89568cf)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3317 [`bbb2dff`](https://github.com/ImageMagick/ImageMagick6/commit/bbb2dff98d0e97a0fe3f7e187855476c4590eed2)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3297 [`841138c`](https://github.com/ImageMagick/ImageMagick6/commit/841138cc282722a80e06977d683405a0cf1d78ef)
|
||||
- cosmetic [`63d4768`](https://github.com/ImageMagick/ImageMagick6/commit/63d47686efceeeb4ee68daa01614aab76eecf07c)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3321 [`64c0cc2`](https://github.com/ImageMagick/ImageMagick6/commit/64c0cc234280544dabacc2b28017521851deebde)
|
||||
- pending release [`309cf43`](https://github.com/ImageMagick/ImageMagick6/commit/309cf4397c0d3d9963af04aa9a56fe406446c656)
|
||||
- pending release [`a9c2639`](https://github.com/ImageMagick/ImageMagick6/commit/a9c26392e18cf38d50621ab1719539cb7bf79a61)
|
||||
- fix compiler exception [`2e0bf51`](https://github.com/ImageMagick/ImageMagick6/commit/2e0bf51d81f5b9e5669699ace345330270991d00)
|
||||
- pending release [`627cbd7`](https://github.com/ImageMagick/ImageMagick6/commit/627cbd7ea1e15ea2c9c0b7789e71b4e3a4aba962)
|
||||
- pending release [`588d323`](https://github.com/ImageMagick/ImageMagick6/commit/588d3230ca82c14f2de6e1e894311d9d4fcdb05d)
|
||||
- pending release [`c5e7a8b`](https://github.com/ImageMagick/ImageMagick6/commit/c5e7a8bbe66dd101d81f2bb16be232bfdb2d6d45)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3296 [`f1e68d2`](https://github.com/ImageMagick/ImageMagick6/commit/f1e68d22d1b35459421710587a0dcbab6900b51f)
|
||||
- pending release [`7d56434`](https://github.com/ImageMagick/ImageMagick6/commit/7d564341fe48bcab733188573e0e7d41674ad80c)
|
||||
- ... [`4c08b0d`](https://github.com/ImageMagick/ImageMagick6/commit/4c08b0d598c753b5e0e5cc99be5c47c62323c6e0)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3320 [`b365302`](https://github.com/ImageMagick/ImageMagick6/commit/b3653027e9dc93d03917db602b83d15e70fee575)
|
||||
- pending release [`abad074`](https://github.com/ImageMagick/ImageMagick6/commit/abad074de78b7a71afe8785b046885e0d16d75ce)
|
||||
- pending release [`eb69a8a`](https://github.com/ImageMagick/ImageMagick6/commit/eb69a8adc86a9b6a43d81f39b20a33f6a74d0013)
|
||||
|
||||
## [6.9.12-1](https://github.com/ImageMagick/ImageMagick6/compare/6.9.12-0...6.9.12-1) - 2021-02-21
|
||||
|
||||
### Commits
|
||||
|
||||
- ... [`ea03af8`](https://github.com/ImageMagick/ImageMagick6/commit/ea03af8be5183f7a2fda2afad06e4e9a0a75893b)
|
||||
- ... [`7854805`](https://github.com/ImageMagick/ImageMagick6/commit/7854805a0e012213dad5b813e0de78799348f255)
|
||||
- ... [`268dc9f`](https://github.com/ImageMagick/ImageMagick6/commit/268dc9f87749044cc2de2e384128e6a4aed06669)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3258 [`d285259`](https://github.com/ImageMagick/ImageMagick6/commit/d2852597c575cad62a65ed6edeeb8f5a36077add)
|
||||
- ... [`f27cfb1`](https://github.com/ImageMagick/ImageMagick6/commit/f27cfb112338057f8fac5d6b016b3c69fb119b84)
|
||||
- pending release [`05fc76c`](https://github.com/ImageMagick/ImageMagick6/commit/05fc76c3de140ab0ee5438b6be2d52bd5d8c323a)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3259 [`e6a300e`](https://github.com/ImageMagick/ImageMagick6/commit/e6a300ef2da27bcf767fdc9f43aea9bb73054b33)
|
||||
- https://github.com/ImageMagick/ImageMagick/pull/3241 [`a19d95d`](https://github.com/ImageMagick/ImageMagick6/commit/a19d95d36f92b4266364fa6bbcea3e2cc0da712d)
|
||||
- https://github.com/ImageMagick/ImageMagick/issues/3242 [`68ce241`](https://github.com/ImageMagick/ImageMagick6/commit/68ce2418726f566e43624f2ef1906d86746c8c2e)
|
||||
- ... [`90510e0`](https://github.com/ImageMagick/ImageMagick6/commit/90510e0d208d498650ff6400fd405bdf1711e082)
|
||||
|
||||
## [6.9.12-0](https://github.com/ImageMagick/ImageMagick6/compare/6.9.11-62...6.9.12-0) - 2021-02-13
|
||||
|
||||
### Commits
|
||||
|
||||
- update docs [`dab48ba`](https://github.com/ImageMagick/ImageMagick6/commit/dab48bafd2924a7349df9bdc1ce8c36fab893bc2)
|
||||
- bump minor release [`9f1d23f`](https://github.com/ImageMagick/ImageMagick6/commit/9f1d23fa325165a3426ba401b552e65397384e96)
|
||||
- ... [`5d2e553`](https://github.com/ImageMagick/ImageMagick6/commit/5d2e553ff197322676b36c32da7079d2f6e41633)
|
||||
- ... [`efb5ce8`](https://github.com/ImageMagick/ImageMagick6/commit/efb5ce8710604e7b86014a70e91d0372a3930b5b)
|
||||
- ... [`d886aa5`](https://github.com/ImageMagick/ImageMagick6/commit/d886aa509b6258e5312d28d4c106803491f31d92)
|
||||
- ... [`dfd1d7f`](https://github.com/ImageMagick/ImageMagick6/commit/dfd1d7f43c68c4449a1e8666ea6087ff4ff17a05)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30839 [`6f604e9`](https://github.com/ImageMagick/ImageMagick6/commit/6f604e9cc06ea1291b6932fa7786c3a01306c424)
|
||||
- ... [`0824c17`](https://github.com/ImageMagick/ImageMagick6/commit/0824c17ef4405641322bab4c9d717a30b6c80162)
|
||||
- cosmetic [`c8922ae`](https://github.com/ImageMagick/ImageMagick6/commit/c8922ae40e995f93654eeeeb90266867e4a00154)
|
||||
- ... [`37d7edf`](https://github.com/ImageMagick/ImageMagick6/commit/37d7edfc6b4f7270a9539c14541a7d1d7358b6f2)
|
||||
- pending release [`769536d`](https://github.com/ImageMagick/ImageMagick6/commit/769536d06c3dc2171aac1ddd36a01edfa16b1977)
|
||||
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30896 [`b322ab0`](https://github.com/ImageMagick/ImageMagick6/commit/b322ab0074a86cc62073a2b577ef21907f3111d7)
|
@ -1,295 +0,0 @@
|
||||
%global VERSION @PACKAGE_BASE_VERSION@
|
||||
%global Patchlevel @MAGICK_PATCHLEVEL_VERSION@
|
||||
|
||||
Name: @PACKAGE_NAME@
|
||||
Version: %{VERSION}
|
||||
Release: %{Patchlevel}
|
||||
Summary: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images.
|
||||
License: https://imagemagick.org/script/license.php
|
||||
Url: https://imagemagick.org/
|
||||
Source0: https://imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
|
||||
BuildRequires: libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: ghostscript-devel
|
||||
BuildRequires: djvulibre-devel
|
||||
BuildRequires: libwmf-devel, jasper-devel, libtool-ltdl-devel
|
||||
BuildRequires: libX11-devel, libXext-devel, libXt-devel
|
||||
BuildRequires: lcms2-devel, libxml2-devel, librsvg2-devel
|
||||
BuildRequires: fftw-devel, ilmbase-devel, OpenEXR-devel, libwebp-devel
|
||||
BuildRequires: jbigkit-devel
|
||||
BuildRequires: openjpeg2-devel >= 2.1.0
|
||||
BuildRequires: graphviz-devel >= 2.9.0
|
||||
BuildRequires: libraqm-devel
|
||||
BuildRequires: liblqr-1-devel
|
||||
BuildRequires: LibRaw-devel >= 0.14.8
|
||||
BuildRequires: autoconf automake gcc gcc-c++
|
||||
BuildRequires: make
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
|
||||
|
||||
The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.
|
||||
|
||||
ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
|
||||
|
||||
ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under the Apache 2.0 license.
|
||||
|
||||
The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory error and thread data race detection to prevent security vulnerabilities.
|
||||
|
||||
The authoritative ImageMagick web site is https://imagemagick.org. The authoritative source code repository is http://git.imagemagick.org/repos/ImageMagick. We maintain a source code mirror at GitHub.
|
||||
|
||||
%package devel
|
||||
Summary: Library links and header files for ImageMagick application development
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
ImageMagick-devel contains the library links and header files you'll
|
||||
need to develop ImageMagick applications. ImageMagick is an image
|
||||
manipulation program.
|
||||
|
||||
If you want to create applications that will use ImageMagick code or
|
||||
APIs, you need to install ImageMagick-devel as well as ImageMagick.
|
||||
You do not need to install it if you just want to use ImageMagick,
|
||||
however.
|
||||
|
||||
%package libs
|
||||
Summary: ImageMagick libraries to link with
|
||||
|
||||
%description libs
|
||||
This packages contains a shared libraries to use within other applications.
|
||||
|
||||
|
||||
%package djvu
|
||||
Summary: DjVu plugin for ImageMagick
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description djvu
|
||||
This packages contains a plugin for ImageMagick which makes it possible to
|
||||
save and load DjvU files from ImageMagick and libMagickCore using applications.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: ImageMagick HTML documentation
|
||||
|
||||
|
||||
%description doc
|
||||
ImageMagick documentation, this package contains usage (for the
|
||||
commandline tools) and API (for the libraries) documentation in HTML format.
|
||||
Note this documentation can also be found on the ImageMagick website:
|
||||
https://imagemagick.org/.
|
||||
|
||||
|
||||
%package perl
|
||||
Summary: ImageMagick perl bindings
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
|
||||
%description perl
|
||||
Perl bindings to ImageMagick.
|
||||
|
||||
Install ImageMagick-perl if you want to use any perl scripts that use
|
||||
ImageMagick.
|
||||
|
||||
|
||||
%package c++
|
||||
Summary: ImageMagick Magick++ library (C++ bindings)
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description c++
|
||||
This package contains the Magick++ library, a C++ binding to the ImageMagick
|
||||
graphics manipulation library.
|
||||
|
||||
Install ImageMagick-c++ if you want to use any applications that use Magick++.
|
||||
|
||||
|
||||
%package c++-devel
|
||||
Summary: C++ bindings for the ImageMagick library
|
||||
Requires: %{name}-c++%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description c++-devel
|
||||
ImageMagick-devel contains the static libraries and header files you'll
|
||||
need to develop ImageMagick applications using the Magick++ C++ bindings.
|
||||
ImageMagick is an image manipulation program.
|
||||
|
||||
If you want to create applications that will use Magick++ code
|
||||
or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and
|
||||
ImageMagick.
|
||||
|
||||
You don't need to install it if you just want to use ImageMagick, or if you
|
||||
want to develop/compile applications using the ImageMagick C interface,
|
||||
however.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{VERSION}-%{Patchlevel}
|
||||
|
||||
# for %%doc
|
||||
mkdir Magick++/examples
|
||||
cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
|
||||
|
||||
%build
|
||||
autoconf -f -i
|
||||
export CFLAGS="%{optflags} -DIMPNG_SETJMP_IS_THREAD_SAFE"
|
||||
%configure --enable-shared \
|
||||
--disable-static \
|
||||
--with-modules \
|
||||
--with-perl \
|
||||
--with-x \
|
||||
--with-threads \
|
||||
--with-magick_plus_plus \
|
||||
--with-gslib \
|
||||
--with-wmf \
|
||||
--with-webp \
|
||||
--with-openexr \
|
||||
--with-rsvg \
|
||||
--with-xml \
|
||||
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
|
||||
--without-dps \
|
||||
--without-gcc-arch \
|
||||
--with-jbig \
|
||||
--with-openjp2 \
|
||||
--with-raw \
|
||||
--with-lqr \
|
||||
--with-raqm
|
||||
|
||||
# Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
|
||||
make
|
||||
|
||||
|
||||
%install
|
||||
make %{?_smp_mflags} install DESTDIR=%{buildroot} INSTALL="install -p"
|
||||
cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VERSION}
|
||||
rm %{buildroot}%{_libdir}/*.la
|
||||
|
||||
# perlmagick: fix perl path of demo files
|
||||
%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
|
||||
|
||||
# perlmagick: cleanup various perl tempfiles from the build which get installed
|
||||
find %{buildroot} -name "*.bs" |xargs rm -f
|
||||
find %{buildroot} -name ".packlist" |xargs rm -f
|
||||
find %{buildroot} -name "perllocal.pod" |xargs rm -f
|
||||
|
||||
# perlmagick: build files list
|
||||
echo "%defattr(-,root,root,-)" > perl-pkg-files
|
||||
find %{buildroot}/%{_libdir}/perl* -type f -print \
|
||||
| sed "s@^%{buildroot}@@g" > perl-pkg-files
|
||||
find %{buildroot}%{perl_vendorarch} -type d -print \
|
||||
| sed "s@^%{buildroot}@%dir @g" \
|
||||
| grep -v '^%dir %{perl_vendorarch}$' \
|
||||
| grep -v '/auto$' >> perl-pkg-files
|
||||
if [ -z perl-pkg-files ] ; then
|
||||
echo "ERROR: EMPTY FILE LIST"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# fix multilib issues: Rename provided file with platform-bits in name.
|
||||
# Create platform independant file inplace of provided and conditionally include required.
|
||||
# $1 - filename.h to process.
|
||||
function multilibFileVersions(){
|
||||
mv $1 ${1%%.h}-%{__isa_bits}.h
|
||||
|
||||
local basename=$(basename $1)
|
||||
|
||||
cat >$1 <<EOF
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
# include "${basename%%.h}-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
# include "${basename%%.h}-64.h"
|
||||
#else
|
||||
# error "unexpected value for __WORDSIZE macro"
|
||||
#endif
|
||||
EOF
|
||||
}
|
||||
|
||||
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-config.h
|
||||
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-baseconfig.h
|
||||
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/version.h
|
||||
|
||||
%check
|
||||
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
|
||||
%make_build check
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
%ldconfig_scriptlets c++
|
||||
|
||||
%files
|
||||
%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt ChangeLog.md
|
||||
%{_bindir}/[a-z]*
|
||||
%{_mandir}/man[145]/[a-z]*
|
||||
%{_mandir}/man1/%{name}.*
|
||||
|
||||
%files libs
|
||||
%doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
|
||||
%{_libdir}/libMagickCore-6.Q16.so*
|
||||
%{_libdir}/libMagickWand-6.Q16.so*
|
||||
%{_libdir}/%{name}-%{VERSION}
|
||||
%{_datadir}/%{name}-6
|
||||
%exclude %{_libdir}/%{name}-%{VERSION}/modules-Q16/coders/djvu.*
|
||||
%dir %{_sysconfdir}/%{name}-6
|
||||
%config(noreplace) %{_sysconfdir}/%{name}-6/*.xml
|
||||
|
||||
%files devel
|
||||
%{_bindir}/MagickCore-config
|
||||
%{_bindir}/Magick-config
|
||||
%{_bindir}/MagickWand-config
|
||||
%{_bindir}/Wand-config
|
||||
%{_libdir}/libMagickCore-6.Q16.so
|
||||
%{_libdir}/libMagickWand-6.Q16.so
|
||||
%{_libdir}/pkgconfig/MagickCore.pc
|
||||
%{_libdir}/pkgconfig/MagickCore-6.Q16.pc
|
||||
%{_libdir}/pkgconfig/ImageMagick.pc
|
||||
%{_libdir}/pkgconfig/ImageMagick-6.Q16.pc
|
||||
%{_libdir}/pkgconfig/MagickWand.pc
|
||||
%{_libdir}/pkgconfig/MagickWand-6.Q16.pc
|
||||
%{_libdir}/pkgconfig/Wand.pc
|
||||
%{_libdir}/pkgconfig/Wand-6.Q16.pc
|
||||
%dir %{_includedir}/%{name}-6
|
||||
%{_includedir}/%{name}-6/magick
|
||||
%{_includedir}/%{name}-6/wand
|
||||
%{_mandir}/man1/Magick-config.*
|
||||
%{_mandir}/man1/MagickCore-config.*
|
||||
%{_mandir}/man1/Wand-config.*
|
||||
%{_mandir}/man1/MagickWand-config.*
|
||||
|
||||
%files djvu
|
||||
%{_libdir}/%{name}-%{VERSION}/modules-Q16/coders/djvu.*
|
||||
|
||||
%files doc
|
||||
%doc %{_datadir}/doc/%{name}-6
|
||||
%doc %{_datadir}/doc/%{name}-%{VERSION}
|
||||
%doc LICENSE
|
||||
|
||||
%files c++
|
||||
%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
|
||||
%doc www/Magick++/COPYING
|
||||
%{_libdir}/libMagick++-6.Q16.so.*
|
||||
|
||||
%files c++-devel
|
||||
%doc Magick++/examples
|
||||
%{_bindir}/Magick++-config
|
||||
%{_includedir}/%{name}-6/Magick++
|
||||
%{_includedir}/%{name}-6/Magick++.h
|
||||
%{_libdir}/libMagick++-6.Q16.so
|
||||
%{_libdir}/pkgconfig/Magick++.pc
|
||||
%{_libdir}/pkgconfig/Magick++-6.Q16.pc
|
||||
%{_libdir}/pkgconfig/ImageMagick++.pc
|
||||
%{_libdir}/pkgconfig/ImageMagick++-6.Q16.pc
|
||||
%{_mandir}/man1/Magick++-config.*
|
||||
|
||||
%files perl -f perl-pkg-files
|
||||
%{_mandir}/man3/*
|
||||
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
|
||||
|
||||
%changelog
|
||||
* Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
|
||||
- Port of Redhat's RPM script to support ImageMagick.
|
@ -1,98 +0,0 @@
|
||||
Mac OS X-specific Build instructions
|
||||
|
||||
In order to install ImageMagick on OSX, you will first need Apple's "Xcode",
|
||||
which you can get by going to the AppStore and searching for "Xcode" and
|
||||
installing it.
|
||||
|
||||
Next, you will need to install the "Xcode Command Line Tools" which includes
|
||||
the compiler. You can install those by running the following command in the
|
||||
Terminal:
|
||||
|
||||
xcode-select --install
|
||||
|
||||
Now that you have the necessary tools, you have a choice of how to install
|
||||
ImageMagick. The simplest method is to use "homebrew", and that method is shown
|
||||
first below. The alternative method is to install from source, which is shown
|
||||
afterwards.
|
||||
|
||||
################################################################################
|
||||
Method 1: Using "homebrew"
|
||||
################################################################################
|
||||
|
||||
Go to http://brew.sh and copy the one-liner that installs "homebrew".
|
||||
|
||||
Paste that into the Terminal and run it.
|
||||
|
||||
For the very simplest, fastest, most basic ImageMagick installation, run:
|
||||
|
||||
brew install imagemagick
|
||||
|
||||
Test your installation by running:
|
||||
|
||||
identify -version
|
||||
|
||||
If you want to add support for extra features, such as HDRI, Perl, JPEG2000,
|
||||
pango,fftw, TIFF or rsvg etc. you can configure the necessary options by running:
|
||||
|
||||
brew edit imagemagick
|
||||
|
||||
then find the options you need and apply them like this:
|
||||
|
||||
brew reinstall -s imagemagick
|
||||
|
||||
If you have any problems with "homebrew", simply run:
|
||||
|
||||
brew doctor
|
||||
|
||||
and follow the doctor's advice.
|
||||
|
||||
|
||||
################################################################################
|
||||
Method 2: Compile from source - not necessary if you used "homebrew" method
|
||||
################################################################################
|
||||
|
||||
|
||||
Perform these steps as an administrator or with the sudo command:
|
||||
|
||||
Install MacPorts. Download and install http://www.macports.org/ and type the
|
||||
following commands:
|
||||
|
||||
$magick> sudo port -v install freetype +bytecode
|
||||
$magick> sudo port -v install librsvg
|
||||
$magick> sudo port -v install graphviz +gs +wmf +jbig +jpeg2 +lcms
|
||||
|
||||
This installs many of the delegate libraries ImageMagick will utilize such as
|
||||
JPEG and FreeType.
|
||||
|
||||
Use the port command to install any delegate libraries you require, for example:
|
||||
|
||||
$magick> sudo port install jpeg
|
||||
|
||||
Now let's build ImageMagick:
|
||||
|
||||
Download the ImageMagick source distribution and verify the distribution
|
||||
against its message digest.
|
||||
|
||||
Unpack and change into the top-level ImageMagick directory:
|
||||
|
||||
$magick> tar xvfz ImageMagick-6.5.9-0.tar.gz
|
||||
$magick> cd ImageMagick-6.5.9
|
||||
|
||||
Configure ImageMagick:
|
||||
|
||||
$magick> ./configure --prefix=/opt --with-quantum-depth=16 \
|
||||
--disable-dependency-tracking --without-perl
|
||||
|
||||
Build ImageMagick:
|
||||
|
||||
$magick> make
|
||||
|
||||
Install ImageMagick:
|
||||
|
||||
$magick> sudo make install
|
||||
|
||||
To verify your install, type
|
||||
|
||||
$magick> /opt/local/bin/identify -list font
|
||||
|
||||
to list all the fonts ImageMagick knows about.
|
@ -1,658 +0,0 @@
|
||||
Download & Unpack
|
||||
|
||||
ImageMagick builds on a variety of Unix and Unix-like operating systems
|
||||
including Linux, Solaris, FreeBSD, Mac OS X, and others. A compiler is
|
||||
required and fortunately almost all modern Unix systems have one. Download
|
||||
ImageMagick.tar.gz from ftp.imagemagick.org or its mirrors and verify the
|
||||
distribution against its message digest.
|
||||
|
||||
Unpack the distribution with this command:
|
||||
|
||||
$magick> tar xvfz ImageMagick.tar.gz
|
||||
|
||||
Now that you have the ImageMagick Unix/Linux source distribution unpacked,
|
||||
let's configure it.
|
||||
|
||||
Configure
|
||||
|
||||
The configure script looks at your environment and decides what it can cobble
|
||||
together to get ImageMagick compiled and installed on your system. This
|
||||
includes finding a compiler, where your compiler header files are located
|
||||
(e.g. stdlib.h), and if any delegate libraries are available for ImageMagick
|
||||
to use (e.g. JPEG, PNG, TIFF, etc.). If you are willing to accept configure's
|
||||
default options, and build from within the source directory, you can simply
|
||||
type:
|
||||
|
||||
$magick> cd ImageMagick-6.9.6
|
||||
$magick> ./configure
|
||||
|
||||
Watch the configure script output to verify that it finds everything that
|
||||
you think it should. Pay particular attention to the last lines of the script
|
||||
output. For example, here is a recent report from our system:
|
||||
|
||||
ImageMagick is configured as follows. Please verify that this configuration
|
||||
matches your expectations.
|
||||
|
||||
Host system type: x86_64-unknown-linux-gnu
|
||||
Build system type: x86_64-unknown-linux-gnu
|
||||
|
||||
Option Value
|
||||
----------------------------------------------------------------------------
|
||||
Shared libraries --enable-shared=yes yes
|
||||
Static libraries --enable-static=yes yes
|
||||
Module support --with-modules=yes yes
|
||||
GNU ld --with-gnu-ld=yes yes
|
||||
Quantum depth --with-quantum-depth=16 16
|
||||
High Dynamic Range Imagery
|
||||
--enable-hdri=no no
|
||||
|
||||
Delegate Configuration:
|
||||
BZLIB --with-bzlib=yes yes
|
||||
Autotrace --with-autotrace=yes yes
|
||||
DJVU --with-djvu=yes no
|
||||
DPS --with-dps=yes no
|
||||
FlashPIX --with-fpx=yes no
|
||||
FontConfig --with-fontconfig=yes yes
|
||||
FreeType --with-freetype=yes yes
|
||||
GhostPCL None pcl6 (unknown)
|
||||
GhostXPS None gxps (unknown)
|
||||
Ghostscript None gs (8.63)
|
||||
result_ghostscript_font_dir='none'
|
||||
Ghostscript fonts --with-gs-font-dir=default
|
||||
Ghostscript lib --with-gslib=yes no (failed tests)
|
||||
Graphviz --with-gvc=yes yes
|
||||
JBIG --with-jbig= no
|
||||
JPEG v1 --with-jpeg=yes yes
|
||||
JPEG-2000 --with-jp2=yes yes
|
||||
LCMS v1 --with-lcms=yes yes
|
||||
LCMS v2 --with-lcms2=yes yes
|
||||
LQR --with-lqr=yes no
|
||||
Magick++ --with-magick-plus-plus=yes yes
|
||||
OpenEXR --with-openexr=yes yes
|
||||
PERL --with-perl=yes /usr/bin/perl
|
||||
PNG --with-png=yes yes
|
||||
RSVG --with-rsvg=yes yes
|
||||
TIFF --with-tiff=yes yes
|
||||
result_windows_font_dir='none'
|
||||
Windows fonts --with-windows-font-dir=
|
||||
WMF --with-wmf=yes yes
|
||||
X11 --with-x= yes
|
||||
XML --with-xml=yes yes
|
||||
ZLIB --with-zlib=yes yes
|
||||
|
||||
X11 Configuration:
|
||||
X_CFLAGS =
|
||||
X_PRE_LIBS = -lSM -lICE
|
||||
X_LIBS =
|
||||
X_EXTRA_LIBS =
|
||||
|
||||
Options used to compile and link:
|
||||
PREFIX = /usr/local
|
||||
EXEC-PREFIX = /usr/local
|
||||
VERSION = 6.4.8
|
||||
CC = gcc -std=gnu99
|
||||
CFLAGS = -fopenmp -g -O2 -Wall -W -pthread
|
||||
MAGICK_CFLAGS = -fopenmp -g -O2 -Wall -W -pthread
|
||||
CPPFLAGS = -I/usr/local/include/ImageMagick
|
||||
PCFLAGS = -fopenmp
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
LDFLAGS = -lfreetype
|
||||
MAGICK_LDFLAGS = -L/usr/local/lib -lfreetype
|
||||
LIBS = -lMagickCore -llcms -ltiff -lfreetype -ljpeg
|
||||
-lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz
|
||||
-lm -lgomp -lpthread -lltdl
|
||||
CXX = g++
|
||||
CXXFLAGS = -g -O2 -Wall -W -pthread
|
||||
|
||||
You can influence the choice of compiler, compilation flags, or libraries of
|
||||
the configure script by setting initial values for variables in the configure
|
||||
command line. These include, among others:
|
||||
|
||||
CC
|
||||
Name of C compiler (e.g. cc -Xa) to use.
|
||||
|
||||
CXX
|
||||
Name of C++ compiler to use (e.g. CC).
|
||||
|
||||
CFLAGS
|
||||
Compiler flags (e.g. -g -O2) to compile C code.
|
||||
|
||||
CXXFLAGS
|
||||
Compiler flags (e.g. -g -O2) to compile C++ code.
|
||||
|
||||
CPPFLAGS
|
||||
Include paths (.e.g. -I/usr/local) to look for header files.
|
||||
|
||||
LDFLAGS
|
||||
Library paths (.e.g. -L/usr/local) to look for libraries systems that
|
||||
support the notion of a library run-path may require an additional
|
||||
argument in order to find shared libraries at run time. For example,
|
||||
the Solaris linker requires an argument of the form -R/path. Some
|
||||
Linux systems will work with -rpath /usr/local/lib, while some other
|
||||
Linux systems who's gcc does not pass -rpath to the linker require
|
||||
an argument of the form -Wl,-rpath,/usr/local/lib.
|
||||
|
||||
LIBS
|
||||
Extra libraries (.e.g. -l/usr/local/lib) required to link.
|
||||
|
||||
Here is an example of setting configure variables from the command line:
|
||||
|
||||
$magick> ./configure CC=c99 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
Any variable (e.g. CPPFLAGS or LDFLAGS) which requires a directory path must
|
||||
specify an absolute path rather than a relative path.
|
||||
|
||||
Configure can usually find the X include and library files automagically,
|
||||
but if it doesn't, you can use the --x-includes=path and --x-libraries=path
|
||||
options to specify their locations.
|
||||
|
||||
The configure script provides a number of ImageMagick specific
|
||||
options. When disabling an option --disable-something is equivalent to
|
||||
specifying --enable-something=no and --without-something is equivalent to
|
||||
--with-something=no. The configure options are as follows (execute configure
|
||||
--help to see all options).
|
||||
|
||||
ImageMagick options represent either features to be enabled, disabled,
|
||||
or packages to be included in the build. When a feature is enabled (via
|
||||
--enable-something), it enables code already present in ImageMagick. When a
|
||||
package is enabled (via --with-something), the configure script will search
|
||||
for it, and if is properly installed and ready to use (headers and built
|
||||
libraries are found by compiler) it will be included in the build. The
|
||||
configure script is delivered with all features disabled and all packages
|
||||
enabled. In general, the only reason to disable a package is if a package
|
||||
exists but it is unsuitable for the build (perhaps an old version or not
|
||||
compiled with the right compilation flags).
|
||||
|
||||
Here are the optional features you can configure:
|
||||
|
||||
--enable-shared
|
||||
build the shared libraries and support for loading coder and process
|
||||
modules. Shared libraries are preferred because they allow programs
|
||||
to share common code, making the individual programs much smaller. In
|
||||
addition shared libraries are required in order for PerlMagick to be
|
||||
dynamically loaded by an installed PERL (otherwise an additional PERL
|
||||
(PerlMagick) must be installed.
|
||||
|
||||
ImageMagick built with delegates (see MAGICK PLUG-INS below) can pose
|
||||
additional challenges. If ImageMagick is built using static libraries (the
|
||||
default without --enable-shared) then delegate libraries may be built as
|
||||
either static libraries or shared libraries. However, if ImageMagick is
|
||||
built using shared libraries, then all delegate libraries must also be
|
||||
built as shared libraries. Static libraries usually have the extension
|
||||
.a, while shared libraries typically have extensions like .so, .sa, or
|
||||
.dll. Code in shared libraries normally must compiled using a special
|
||||
compiler option to produce Position Independent Code (PIC). The only
|
||||
time this not necessary is if the platform compiles code as PIC by
|
||||
default.
|
||||
|
||||
PIC compilation flags differ from vendor to vendor (gcc's is
|
||||
-fPIC). However, you must compile all shared library source with the
|
||||
same flag (for gcc use -fPIC rather than -fpic). While static libraries
|
||||
are normally created using an archive tool like ar, shared libraries
|
||||
are built using special linker or compiler options (e.g. -shared for gcc).
|
||||
|
||||
If --enable-shared is not specified, a new PERL interpreter (PerlMagick)
|
||||
is built which is statically linked against the PerlMagick extension. This
|
||||
new interpreter is installed into the same directory as the ImageMagick
|
||||
utilities. If --enable-shared is specified, the PerlMagick extension is
|
||||
built as a dynamically loadable object which is loaded into your current
|
||||
PERL interpreter at run-time. Use of dynamically-loaded extensions is
|
||||
preferable over statically linked extensions so use --enable-shared if
|
||||
possible (note that all libraries used with ImageMagick must be shared
|
||||
libraries!).
|
||||
|
||||
--disable-static
|
||||
static archive libraries (with extension .a) are not built. If you
|
||||
are building shared libraries, there is little value to building static
|
||||
libraries. Reasons to build static libraries include: 1) they can be
|
||||
easier to debug; 2) clients do not have external dependencies (i.e.
|
||||
libMagick.so); 3) building PIC versions of the delegate libraries may
|
||||
take additional expertise and effort; 4) you are unable to build shared
|
||||
libraries.
|
||||
|
||||
--disable-installed
|
||||
disable building an installed ImageMagick (default enabled).
|
||||
|
||||
By default the ImageMagick build is configured to formally install
|
||||
into a directory tree. This the most secure and reliable way to install
|
||||
ImageMagick. Use this option to configure ImageMagick so that it doesn't
|
||||
use hard-coded paths and locates support files by computing an offset path
|
||||
from the executable (or from the location specified by the MAGICK_HOME
|
||||
environment variable. The uninstalled configuration is ideal for binary
|
||||
distributions which are expected to extract and run in any location.
|
||||
|
||||
--enable-ccmalloc
|
||||
enable 'ccmalloc' memory debug support (default disabled).
|
||||
|
||||
--enable-prof
|
||||
enable 'prof' profiling support (default disabled).
|
||||
|
||||
--enable-gprof
|
||||
enable 'gprof' profiling support (default disabled).
|
||||
|
||||
--enable-gcov
|
||||
enable 'gcov' profiling support (default disabled).
|
||||
|
||||
--disable-openmp
|
||||
disable OpenMP (default enabled).
|
||||
|
||||
Certain ImageMagick algorithms, for example convolution, can achieve
|
||||
a significant speed-up with the assistance of the OpenMP API when
|
||||
running on modern dual and quad-core processors.
|
||||
|
||||
--disable-largefile
|
||||
disable support for large (64 bit) file offsets.
|
||||
|
||||
By default, ImageMagick is compiled with support for large files (>
|
||||
2GB on a 32-bit CPU) if the operating system supports large files. Some
|
||||
applications which use the ImageMagick library may also require support
|
||||
for large files. By disabling support for large files via
|
||||
--disable-largefile, dependent applications do not require special
|
||||
compilation options for large files in order to use the library.
|
||||
|
||||
Here are the optional packages you can configure:
|
||||
|
||||
--with-quantum-depth
|
||||
number of bits in a pixel quantum (default 16).
|
||||
|
||||
Use this option to specify the number of bits to use per pixel quantum
|
||||
(the size of the red, green, blue, and alpha pixel components). For
|
||||
example, --with-quantum-depth=8 builds ImageMagick using 8-bit quantums.
|
||||
Most computer display adapters use 8-bit quantums. Currently supported
|
||||
arguments are 8, 16, or 32. We recommend the default of 16 because
|
||||
some image formats support 16 bits-per-pixel. However, this option is
|
||||
important in determining the overall run-time performance of ImageMagick.
|
||||
|
||||
The number of bits in a quantum determines how many values it may
|
||||
contain. Each quantum level supports 256 times as many values as the
|
||||
previous level. The following table shows the range available for various
|
||||
quantum sizes.
|
||||
|
||||
Quantum Depth Valid Range (Decimal) Valid Range (Hex)
|
||||
8 0-255 00-FF
|
||||
16 0-65535 0000-FFFF
|
||||
32 0-4294967295 00000000-FFFFFFFF
|
||||
|
||||
Larger pixel quantums can cause ImageMagick to run more slowly and to
|
||||
require more memory. For example, using sixteen-bit pixel quantums can
|
||||
cause ImageMagick to run 15% to 50% slower (and take twice as much memory)
|
||||
than when it is built to support eight-bit pixel quantums.
|
||||
|
||||
The amount of virtual memory consumed by an image can be computed by
|
||||
the equation (5 * Quantum Depth * Rows * Columns) / 8. This an important
|
||||
consideration when resources are limited, particularly since processing
|
||||
an image may require several images to be in memory at one time. The
|
||||
following table shows memory consumption values for a 1024x768 image:
|
||||
|
||||
Quantum Depth Virtual Memory
|
||||
8 3MB
|
||||
16 8MB
|
||||
32 15MB
|
||||
|
||||
--enable-hdri
|
||||
accurately represent the wide range of intensity levels (experimental).
|
||||
|
||||
--enable-osx-universal-binary
|
||||
build a universal binary on OS X.
|
||||
|
||||
--without-modules
|
||||
disable support for dynamically loadable modules.
|
||||
|
||||
Image coders and process modules are built as loadable modules which are
|
||||
installed under the directory [prefix]/lib/ImageMagick-X.X.X/modules-QN
|
||||
(where 'N' equals 8, 16, or 32 depending on the quantum depth) in the
|
||||
subdirectories coders and filters respectively. The modules build option
|
||||
is only available in conjunction with --enable-shared. If --enable-shared
|
||||
is not also specified, support for building modules is disabled. Note that
|
||||
if --enable-shared and --disable-modules are specified, the module loader
|
||||
is active (allowing extending an installed ImageMagick by simply copying
|
||||
a module into place) but ImageMagick itself is not built using modules.
|
||||
|
||||
--with-cache
|
||||
set pixel cache threshold (defaults to available memory).
|
||||
|
||||
Specify a different image pixel cache threshold with this option. This
|
||||
sets the maximum amount of heap memory that ImageMagick is allowed to
|
||||
consume before switching to using memory-mapped temporary files to store
|
||||
raw pixel data.
|
||||
|
||||
--without-threads
|
||||
disable threads support.
|
||||
|
||||
By default, the ImageMagick library is compiled with multi-thread
|
||||
support. If this undesirable, specify --without-threads.
|
||||
|
||||
--with-frozenpaths
|
||||
enable frozen delegate paths.
|
||||
|
||||
Normally, external program names are substituted into the delegates.xml
|
||||
configuration file without full paths. Specify this option to enable
|
||||
saving full paths to programs using locations determined by configure.
|
||||
This useful for environments where programs are stored under multiple
|
||||
paths, and users may use different PATH settings than the person who
|
||||
builds ImageMagick.
|
||||
|
||||
--without-magick-plus-plus
|
||||
disable build/install of Magick++.
|
||||
|
||||
Disable building Magick++, the C++ application programming interface
|
||||
to ImageMagick. A suitable C++ compiler is required in order to build
|
||||
Magick++. Specify the CXX configure variable to select the C++ compiler
|
||||
to use (default g++), and CXXFLAGS to select the desired compiler
|
||||
optimization and debug flags (default -g -O2). Antique C++ compilers
|
||||
will normally be rejected by configure tests so specifying this option
|
||||
should only be necessary if Magick++ fails to compile.
|
||||
|
||||
--with-package-release-name
|
||||
encode this name into the shared library name (see libtools -release
|
||||
option).
|
||||
|
||||
--without-perl
|
||||
disable build/install of PerlMagick, or
|
||||
|
||||
By default, PerlMagick is conveniently compiled and installed as part
|
||||
of ImageMagick's normal configure, make, sudo make install process. When
|
||||
--without-perl is specified, you must first install ImageMagick, change to
|
||||
the PerlMagick subdirectory, build, and finally install PerlMagick. Note,
|
||||
PerlMagick is configured even if --without-perl is specified. If the
|
||||
argument --with-perl=/path/to/perl is supplied, /../path/to/perl is be
|
||||
taken as the PERL interpreter to use. This important in case the perl
|
||||
executable in your PATH is not PERL5, or is not the PERL you want to use.
|
||||
|
||||
--with-perl=PERL
|
||||
use specified Perl binary to configure PerlMagick.
|
||||
|
||||
--with-perl-options=OPTIONS
|
||||
options to pass on command-line when generating PerlMagick's Makefile
|
||||
from Makefile.PL.
|
||||
|
||||
The PerlMagick module is normally installed using the Perl interpreter's
|
||||
installation PREFIX, rather than ImageMagick's. If ImageMagick's
|
||||
installation prefix is not the same as PERL's PREFIX, then you
|
||||
may find that PerlMagick's sudo make install step tries to install
|
||||
into a directory tree that you don't have write permissions to. This
|
||||
common when PERL is delivered with the operating system or on Internet
|
||||
Service Provider (ISP) web servers. If you want PerlMagick to install
|
||||
elsewhere, then provide a PREFIX option to PERL's configuration step
|
||||
via "--with-perl-options=PREFIX=/some/place". Other options accepted by
|
||||
MakeMaker are 'LIB', 'LIBPERL_A', 'LINKTYPE', and 'OPTIMIZE'. See the
|
||||
ExtUtils::MakeMaker(3) manual page for more information on configuring
|
||||
PERL extensions.
|
||||
|
||||
--without-bzlib
|
||||
disable BZLIB support.
|
||||
|
||||
--without-dps
|
||||
disable Display Postscript support.
|
||||
|
||||
--with-fpx
|
||||
enable FlashPIX support.
|
||||
|
||||
--without-freetype
|
||||
disable TrueType support.
|
||||
|
||||
--with-gslib
|
||||
enable Ghostscript library support.
|
||||
|
||||
--without-jbig
|
||||
disable JBIG support.
|
||||
|
||||
--without-jpeg
|
||||
disable JPEG support.
|
||||
|
||||
--without-jp2
|
||||
disable JPEG v2 support.
|
||||
|
||||
--without-lcms
|
||||
disable lcms (v1.1X) support
|
||||
|
||||
--without-lcms2
|
||||
disable lcms (v2.X) support
|
||||
|
||||
--without-lzma
|
||||
disable LZMA support.
|
||||
|
||||
--without-png
|
||||
disable PNG support.
|
||||
|
||||
--without-tiff
|
||||
disable TIFF support.
|
||||
|
||||
--without-wmf
|
||||
disable WMF support.
|
||||
|
||||
--with-fontpath
|
||||
prepend to default font search path.
|
||||
|
||||
--with-gs-font-dir
|
||||
directory containing Ghostscript fonts.
|
||||
|
||||
Specify the directory containing the Ghostscript Postscript Type 1 font
|
||||
files (e.g. n022003l.pfb) so that they can be rendered using the FreeType
|
||||
library. If the font files are installed using the default Ghostscript
|
||||
installation paths (${prefix}/share/ghostscript/fonts), they should
|
||||
be discovered automagically by configure and specifying this option is
|
||||
not necessary. Specify this option if the Ghostscript fonts fail to be
|
||||
located automagically, or the location needs to be overridden.
|
||||
|
||||
--with-windows-font-dir
|
||||
directory containing MS-Windows fonts.
|
||||
|
||||
Specify the directory containing MS-Windows-compatible fonts. This not
|
||||
necessary when ImageMagick is running under MS-Windows.
|
||||
|
||||
--without-xml
|
||||
disable XML support.
|
||||
|
||||
--without-zlib
|
||||
disable ZLIB support.
|
||||
|
||||
--without-x
|
||||
don't use the X Window System.
|
||||
|
||||
By default, ImageMagick uses the X11 delegate libraries if they are
|
||||
available. When --without-x is specified, use of X11 is disabled. The
|
||||
display, animate, and import sub-commands are not included. The remaining
|
||||
sub-commands have reduced functionality such as no access to X11 fonts
|
||||
(consider using Postscript or TrueType fonts instead).
|
||||
|
||||
--with-share-path=DIR
|
||||
Alternate path to share directory (default share/ImageMagick).
|
||||
|
||||
--with-libstdc=DIR
|
||||
use libstdc++ in DIR (for GNU C++).
|
||||
|
||||
While configure is designed to ease installation of ImageMagick, it often
|
||||
discovers problems that would otherwise be encountered later when compiling
|
||||
ImageMagick. The configure script tests for headers and libraries by
|
||||
executing the compiler (CC) with the specified compilation flags (CFLAGS),
|
||||
pre-processor flags (CPPFLAGS), and linker flags (LDFLAGS). Any errors are
|
||||
logged to the file config.log. If configure fails to discover a header or
|
||||
library please review this log file to determine why, however, please be
|
||||
aware that *errors in the config.log are normal* because configure works by
|
||||
trying something and seeing if it fails. An error in config.log is only a
|
||||
problem if the test should have passed on your system.
|
||||
|
||||
Common causes of configure failures are: 1) a delegate header is not in the
|
||||
header include path (CPPFLAGS -I option); 2) a delegate library is not in
|
||||
the linker search/run path (LDFLAGS -L/-R option); 3) a delegate library is
|
||||
missing a function (old version?); or 4) compilation environment is faulty.
|
||||
|
||||
If all reasonable corrective actions have been tried and the problem appears
|
||||
be due to a flaw in the configure script, please send a bug report to the
|
||||
ImageMagick Defect Support Forum. All bug reports should contain the operating
|
||||
system type (as reported by uname -a) and the compiler/compiler-version. A
|
||||
copy of the configure script output and/or the relevant portion of config.log
|
||||
file may be valuable in order to find the problem. If you post portions
|
||||
of config.log, please also send a script of the configure output and a
|
||||
description of what you expected to see (and why) so the failure you are
|
||||
observing can be identified and resolved.
|
||||
|
||||
ImageMagick is now configured and ready to build
|
||||
|
||||
Build
|
||||
|
||||
Once ImageMagick is configured, these standard build targets are available
|
||||
from the generated make files:
|
||||
|
||||
make
|
||||
build ImageMagick.
|
||||
|
||||
sudo make install
|
||||
install ImageMagick.
|
||||
|
||||
make check
|
||||
Run tests using the installed ImageMagick (sudo make install must be
|
||||
done first). Ghostscript is a prerequisite, otherwise the EPS, PS,
|
||||
and PDF tests will fail.
|
||||
|
||||
make clean
|
||||
Remove everything in the build directory created by make.
|
||||
|
||||
make distclean
|
||||
remove everything in the build directory created by configure and
|
||||
make. This useful if you want to start over from scratch.
|
||||
|
||||
make uninstall
|
||||
Remove all files from the system which are (or would be) installed by sudo
|
||||
make install using the current configuration. Note that this target is
|
||||
imperfect for PerlMagick since Perl no longer supports an uninstall
|
||||
target.
|
||||
|
||||
In most cases you will simply want to compile ImageMagick with this command:
|
||||
|
||||
$magick> make
|
||||
|
||||
Once built, you can optionally install ImageMagick on your system as
|
||||
discussed below.
|
||||
|
||||
Install
|
||||
|
||||
Now that ImageMagick is configured and built, type:
|
||||
|
||||
$magick> make install
|
||||
|
||||
to install it.
|
||||
|
||||
By default, ImageMagick is installs binaries in /../usr/local/bin, libraries
|
||||
in /../usr/local/lib, header files in /../usr/local/include and documentation
|
||||
in /../usr/local/share. You can specify an alternative installation prefix
|
||||
other than /../usr/local by giving configure the option --prefix=PATH. This
|
||||
valuable in case you don't have privileges to install under the default
|
||||
paths or if you want to install in the system directories instead.
|
||||
|
||||
To confirm your installation of the ImageMagick distribution was successful,
|
||||
ensure that the installation directory is in your executable search path
|
||||
and type:
|
||||
|
||||
$magick> display
|
||||
|
||||
The ImageMagick logo is displayed on your X11 display.
|
||||
|
||||
To verify the ImageMagick build configuration, type:
|
||||
|
||||
$magick> identify -list configure
|
||||
|
||||
To list which image formats are supported , type:
|
||||
|
||||
$magick> identify -list format
|
||||
|
||||
For a more comprehensive test, you run the ImageMagick test suite by typing:
|
||||
|
||||
$magick> make check
|
||||
|
||||
Ghostscript is a prerequisite, otherwise the EPS, PS, and PDF tests will
|
||||
fail. Note that due to differences between the developer's environment and
|
||||
your own it is possible that a few tests may fail even though the results are
|
||||
ok. Differences between the developer's environment environment and your own
|
||||
may include the compiler, the CPU type, and the library versions used. The
|
||||
ImageMagick developers use the current release of all dependent libraries.
|
||||
|
||||
Linux-specific Build instructions
|
||||
|
||||
Download ImageMagick.src.rpm from ftp.imagemagick.org or its mirrors and
|
||||
verify the distribution against its message digest.
|
||||
|
||||
Build ImageMagick with this command:
|
||||
|
||||
$magick> rpmbuild --rebuild ImageMagick.src.rpm
|
||||
|
||||
After the build you, locate the RPMS folder and install the ImageMagick
|
||||
binary RPM distribution:
|
||||
|
||||
$magick> rpm -ivh ImageMagick-6.8.2-?.*.rpm
|
||||
|
||||
MinGW-specific Build instructions
|
||||
|
||||
Although you can download and install delegate libraries yourself, many
|
||||
are already available in the GnuWin32 distribution. Download and install
|
||||
whichever delegate libraries you require such as JPEG, PNG, TIFF, etc. Make
|
||||
sure you specify the development headers when you install a package. Next
|
||||
type,
|
||||
|
||||
$magick> tar jxvf ImageMagick-6.8.2-?.tar.bz2
|
||||
$magick> cd ImageMagick-6.8.2
|
||||
$magick> export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include"
|
||||
$magick> export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib"
|
||||
$magick> ./configure --without-perl
|
||||
$magick> make $magick> sudo make install
|
||||
|
||||
Dealing with Unexpected Problems
|
||||
|
||||
Chances are the download, configure, build, and install of ImageMagick went
|
||||
flawlessly as it is intended, however, certain systems and environments may
|
||||
cause one or more steps to fail. We discuss a few problems we've run across
|
||||
and how to take corrective action to ensure you have a working release
|
||||
of ImageMagick
|
||||
|
||||
Build Problems
|
||||
|
||||
If the build complains about missing dependencies (e.g. .deps/source.PLO),
|
||||
add --disable-dependency-tracking to your configure command line.
|
||||
|
||||
Some systems may fail to link at build time due to unresolved symbols. Try
|
||||
adding the LDFLAGS to the configure command line:
|
||||
|
||||
$magick> configure LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
|
||||
|
||||
Dynamic Linker Run-time Bindings
|
||||
|
||||
On some systems, ImageMagick may not find its shared library, libMagick.so. Try
|
||||
running the ldconfig with the library path:
|
||||
|
||||
$magick> /sbin/ldconfig /usr/local/lib
|
||||
|
||||
Solaris and Linux systems have the ldd command which is useful to track which
|
||||
libraries ImageMagick depends on:
|
||||
|
||||
$magick> ldd `which convert`
|
||||
|
||||
Delegate Libraries
|
||||
|
||||
On occasion you may receive these warnings:
|
||||
|
||||
no decode delegate for this image format
|
||||
no encode delegate for this image format
|
||||
|
||||
This exception indicates that an external delegate library or its headers
|
||||
were not available when ImageMagick was built. To add support for the image
|
||||
format, download and install the requisite delegate library and its header
|
||||
files and reconfigure, rebuild, and reinstall ImageMagick. As an example,
|
||||
lets add support for the JPEG image format. First we install the JPEG RPMS:
|
||||
|
||||
$magick> yum install libjpeg libjpeg-devel
|
||||
|
||||
Now reconfigure, rebuild, and reinstall ImageMagick. To verify JPEG is now
|
||||
properly supported within ImageMagick, use this command:
|
||||
|
||||
$magick> identify -list format
|
||||
|
||||
You should see a mode of rw- associated with the JPEG tag. This mode means
|
||||
the image can be read or written and can only support one image per image
|
||||
file.
|
||||
|
||||
PerlMagick
|
||||
|
||||
If PerlMagick fails to link with a message similar to libperl.a is not found,
|
||||
rerun configure with the --enable-shared or --enable-shared --with-modules
|
||||
options.
|
@ -1,33 +0,0 @@
|
||||
VMS COMPILATION
|
||||
|
||||
You might want to check the values of certain program definitions
|
||||
before compiling. Verify the definitions in delegates.xml to suit
|
||||
your local requirements. Next, type.
|
||||
|
||||
Type
|
||||
|
||||
unzip ImageMagick-6.7.4-0.zip
|
||||
set default [.imagemagick]
|
||||
@make
|
||||
set display/create/node=node_name::
|
||||
|
||||
where node_name is the DECNET X server to contact.
|
||||
|
||||
Note : the MAKE.COM files compile every thing with /name=(as_is,short). all
|
||||
the requested graphical lib's should be compiled with this qualifier (see
|
||||
http://nchrem.tnw.tudelft/openvms for details on additional libraries
|
||||
needed). All the .olb files of the libs are expected to be in SYS$LIBRARY.
|
||||
|
||||
Edit the MAKE.COM in the top directory and [.MAGICK]CONFIG.H_VMS to
|
||||
add/remove optional graphical support.
|
||||
|
||||
Finally type:
|
||||
|
||||
display
|
||||
|
||||
Thanks to pmoreau@cenaath.cena.dgac.fr for supplying invaluable help
|
||||
as well as the VMS versions of the JPEG, PNG, TTF, and TIFF libraries.
|
||||
|
||||
Thanks to Joukj@hrem.stm.tudelft.{nl} for providing a patches to get
|
||||
ImageMagick working under OpenVMS. See
|
||||
http://nchrem.tnw.tudelft.nl/openvms/software2.html#Magick.
|
@ -1,2 +0,0 @@
|
||||
Instructions on how to build ImageMagick on Windows can be found here:
|
||||
https://github.com/ImageMagick/ImageMagick-Windows6
|
@ -1,103 +0,0 @@
|
||||
Before we get to the text of the license, lets just review what the license says in simple terms:
|
||||
|
||||
It allows you to:
|
||||
|
||||
* freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes;
|
||||
* use ImageMagick software in packages or distributions that you create;
|
||||
* link against a library under a different license;
|
||||
* link code under a different license against a library under this license;
|
||||
* merge code into a work under a different license;
|
||||
* extend patent grants to any code using code under this license;
|
||||
* and extend patent protection.
|
||||
|
||||
It forbids you to:
|
||||
|
||||
* redistribute any piece of ImageMagick-originated software without proper attribution;
|
||||
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that ImageMagick Studio LLC endorses your distribution;
|
||||
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that you created the ImageMagick software in question.
|
||||
|
||||
It requires you to:
|
||||
|
||||
* include a copy of the license in any redistribution you may make that includes ImageMagick software;
|
||||
* provide clear attribution to ImageMagick Studio LLC for any distributions that include ImageMagick software.
|
||||
|
||||
It does not require you to:
|
||||
|
||||
* include the source of the ImageMagick software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it;
|
||||
* submit changes that you make to the software back to the ImageMagick Studio LLC (though such feedback is encouraged).
|
||||
|
||||
A few other clarifications include:
|
||||
|
||||
* ImageMagick is freely available without charge;
|
||||
* you may include ImageMagick on a DVD as long as you comply with the terms of the license;
|
||||
* you can give modified code away for free or sell it under the terms of the ImageMagick license or distribute the result under a different license, but you need to acknowledge the use of the ImageMagick software;
|
||||
* the license is compatible with the GPL V3.
|
||||
* when exporting the ImageMagick software, review its export classification.
|
||||
|
||||
Terms and Conditions for Use, Reproduction, and Distribution
|
||||
|
||||
The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow:
|
||||
|
||||
Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
License shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
Legal Entity shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
You (or Your) shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
Source form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
Object form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
Work shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
Derivative Works shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
Contribution shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution.
|
||||
|
||||
Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
* You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
* You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
* You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
* If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
How to Apply the License to your Work
|
||||
|
||||
To apply the ImageMagick License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information (don't include the brackets). The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the ImageMagick License (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy
|
||||
of the License at
|
||||
|
||||
https://imagemagick.org/script/license.php
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
@ -1,19 +0,0 @@
|
||||
The author and maintainer of Magick++ is Bob Friesenhan
|
||||
<bfriesen@simple.dallas.tx.us>.
|
||||
|
||||
Many thanks to Cristy for developing the powerful ImageMagick
|
||||
package that Magick++ is based on and for enhancing ImageMagick API
|
||||
features in order to allow a cleaner implementation.
|
||||
|
||||
Thanks to Bill Radcliffe <BillR@corbis.com> for his assistance with
|
||||
getting Magick++ to compile under Visual C++, and for maintaining the
|
||||
Windows build environment.
|
||||
|
||||
Thanks to Albert Chin-A-Young <china@thewrittenword.com> for assisting
|
||||
with compilation issues related to the SGI C++ compiler, for providing
|
||||
access to the Sun C++ compiler, and for assistance with the configure
|
||||
script.
|
||||
|
||||
Thanks to Leonard Rosenthol <leonardr@lazerware.com> for ensuring that
|
||||
Magick++ compiles on the Mac.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,164 +0,0 @@
|
||||
|
||||
|
||||
Installing Magick++
|
||||
|
||||
General
|
||||
|
||||
In order to compile Magick++ you must have access to a standard C++
|
||||
implementation. The author uses gcc 3.1 (GNU C++) which is available under
|
||||
UNIX and under the Cygwin UNIX-emulation environment for Windows. Standards
|
||||
compliant commercial C++ compilers should also work fine. Most modern C++
|
||||
compilers for Microsoft Windows or the Mac should work (project files are
|
||||
provided for Microsoft Visual C++ 6.0).
|
||||
|
||||
It was decided that Magick++ will be around for the long-haul, so its API
|
||||
definition depends on valuable C++ features which should be common in all
|
||||
current and future C++ compilers. The compiler must support the following
|
||||
C++ standard features:
|
||||
|
||||
* templates
|
||||
* static constructors
|
||||
* C++-style casts (e.g. static_cast)
|
||||
* bool type
|
||||
* string class (<string>)
|
||||
* exceptions (<exception>)
|
||||
* namespaces
|
||||
* Standard Template Library (STL) (e.g. <list>, <vector>)
|
||||
|
||||
The author has personally verified that Magick++ compiles and runs using the
|
||||
following compiler/platform combinations:
|
||||
|
||||
Tested Configurations
|
||||
|
||||
Operating System Architecture Compiler
|
||||
SunOS 5.6, 5.7, 5.8
|
||||
("Solaris 2.6, 7, & 8) SPARC GCC 3.0.4
|
||||
SunOS 5.7 ("Solaris 7") SPARC Sun Workshop 5.0 C++
|
||||
|
||||
SunOS 5.8 ("Solaris 8") SPARC Sun WorkShop 6 update 2 C++
|
||||
5.3
|
||||
FreeBSD 4.0 Intel Pentium II GCC 2.95
|
||||
|
||||
Windows NT 4.0 SP6a Intel Pentium II Visual C++ 6.0 Standard
|
||||
Edition
|
||||
|
||||
Windows XP Intel Pentium IV Visual C++ 6.0 Standard
|
||||
Edition Service Pack 5
|
||||
Windows '98 + Cygwin 1.3.10 Intel Pentium III GCC 2.95.3-5
|
||||
Windows NT 4.0 SP6a Intel Pentium II GCC 2.95.3-5
|
||||
Windows XP + Cygwin 1.3.10 Intel Pentium IV GCC 2.95.3-5
|
||||
|
||||
Users of Magick++ have reported that the following configurations work with
|
||||
Magick++:
|
||||
|
||||
Other Known Working Configurations
|
||||
|
||||
Operating
|
||||
System Architecture Compiler Reported By
|
||||
Red Hat i386 & alpha EGCS 1.1.2 Dr. Alexander Zimmermann
|
||||
Linux 6.0 <Alexander.Zimmermann@fmi.uni-passau.de>
|
||||
Red Hat i386 GCC 2.95.2 Dr. Alexander Zimmermann
|
||||
Linux 7.0 <Alexander.Zimmermann@fmi.uni-passau.de>
|
||||
Red Hat i386 GCC "2.96" ???
|
||||
Linux 7.0 snapshot
|
||||
Red Hat Dr. Alexander Zimmermann
|
||||
Linux 7.Xi386 & alpha GCC 3.0 <Alexander.Zimmermann@fmi.uni-passau.de>
|
||||
SGI IRIX MIPS IRIX C++ Albert Chin-A-Young
|
||||
6.2, 6.5 7.3.1.2m <china@thewrittenword.com>
|
||||
SunOS Sun WorkShop Albert Chin-A-Young
|
||||
5.5.1 SPARC CC 5.0 <china@thewrittenword.com>
|
||||
SunOS
|
||||
5.6, 5.7,SPARC Sun Forte CC Albert Chin-A-Young
|
||||
5.8 5.3 <china@thewrittenword.com>
|
||||
HP-UX PA-RISC HP-UX aCC Albert Chin-A-Young
|
||||
11.00 A.03.30 <china@thewrittenword.com>
|
||||
Mac OS 9 PowerPC CodeWarrior Leonard Rosenthol <leonardr@digapp.com>
|
||||
Professional
|
||||
Release 6
|
||||
Mac OS X GCC 2.95.2
|
||||
10.1 PowerPC (apple gcc Cristy
|
||||
"Darwin" -926)
|
||||
|
||||
Please let me know if you have successfully built and executed Magick++
|
||||
using a different configuration so that I can add to the table of verified
|
||||
configurations.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Unix/Linux
|
||||
|
||||
Building From Source
|
||||
|
||||
Magick++ is now built using the ImageMagick configure script and Makefiles.
|
||||
Please follow the installation instructions provided by its README.txt file.
|
||||
The following instructions pertain to the Magick++ specific configuration
|
||||
and build options.
|
||||
|
||||
To install ImageMagick plus Magick++ under Unix, installation should be
|
||||
similar to
|
||||
|
||||
./configure [ --prefix=/prefix ]
|
||||
make
|
||||
make install
|
||||
|
||||
The library is currently named similar to 'libMagick++.a' (and/or
|
||||
libMagick++.so.5.0.39) and is installed under prefix/lib while the headers
|
||||
are installed with Magick++.h being installed in prefix/include and the
|
||||
remaining headers in prefix/include/Magick++.
|
||||
|
||||
To influence the options the configure script chooses, you may specify
|
||||
'make' option variables when running the configure script. For example, the
|
||||
command
|
||||
|
||||
|
||||
./configure CXX=CC CXXFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
specifies additional options to the configure script. The following table
|
||||
shows the available options.
|
||||
|
||||
Environment Variables That Effect Configure
|
||||
|
||||
Make Option
|
||||
Variable Description
|
||||
|
||||
CXX Name of C++ compiler (e.g. 'CC -Xa') to use
|
||||
compiler 'CC -Xa'
|
||||
CXXFLAGS Compiler flags (e.g. '-g -O2') to compile with
|
||||
|
||||
CPPFLAGS Include paths (-I/somedir) to look for header
|
||||
files
|
||||
Library paths (-L/somedir) to look for
|
||||
libraries. Systems that support the notion of a
|
||||
LDFLAGS library run-path may additionally require
|
||||
-R/somedir or '-rpath /somedir' in order to
|
||||
find shared libraries at run time.
|
||||
LIBS Extra libraries (-lsomelib) required to link
|
||||
|
||||
Installing Linux RPMs
|
||||
|
||||
Please note that the default version of the C++ compiler delivered with the
|
||||
system may not be sufficient to support Magick++. Use of GCC 2.95 or later is
|
||||
strongly recommended under Linux.
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Windows '9X, NT, 2000, ME, & XP
|
||||
|
||||
Visual C++
|
||||
|
||||
Windows '95 through Windows XP are supported by the ImageMagick source
|
||||
package for NT available in the 'win2k' subdirectory of the ImageMagick ftp
|
||||
site (and mirrors). The ImageMagick source package for NT provides sources
|
||||
to ImageMagick, Magick++, add-on libraries (e.g. JPEG), and a ready-made
|
||||
Visual C++ 6.0 build environment. Please read the configuration and build
|
||||
instructions in README.txt (under the heading "Windows Win2K/95 VISUAL C++
|
||||
6.0 COMPILATION") in order to build Magick++.
|
||||
|
||||
Cygwin & GCC
|
||||
|
||||
It is possible to build both ImageMagick and Magick++ under the Cygwin
|
||||
Unix-emulation environment for Windows NT. Obtain and install Cgywin from
|
||||
http://www.cygwin.com/ . An X11R6 environment for Cygwin is available
|
||||
from http://www.cygwin.com/xfree/ .To build using Cygwin and GCC, follow
|
||||
the instructions for building under Unix. ImageMagick and Magick++ do not
|
||||
yet include support for building Windows DLLs under Cygwin so do not enable
|
||||
dynamic libraries when building ImageMagick.
|
@ -1,24 +0,0 @@
|
||||
|
||||
Copyright 1999 - 2002 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of the source files and associated documentation
|
||||
files ("Magick++"), to deal in Magick++ without restriction,
|
||||
including without limitation of the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell copies of
|
||||
Magick++, and to permit persons to whom the Magick++ is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
This copyright notice shall be included in all copies or
|
||||
substantial portions of Magick++. The copyright to Magick++ is
|
||||
retained by its author and shall not be subsumed or replaced by any
|
||||
other copyright.
|
||||
|
||||
The software is provided "as is", without warranty of any kind,
|
||||
express or implied, including but not limited to the warranties of
|
||||
merchantability, fitness for a particular purpose and
|
||||
noninfringement. In no event shall Bob Friesenhahn be liable for
|
||||
any claim, damages or other liability, whether in an action of
|
||||
contract, tort or otherwise, arising from, out of or in connection
|
||||
with Magick++ or the use or other dealings in Magick++.
|
||||
|
@ -1,266 +0,0 @@
|
||||
#
|
||||
# Top Makefile for Magick++
|
||||
#
|
||||
# Copyright Bob Friesenhahn, 1999, 2000, 2002, 2004, 2008
|
||||
#
|
||||
|
||||
# AM_CPPFLAGS += -I$(top_srcdir)/Magick++/lib
|
||||
|
||||
MAGICKPP_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/Magick++/lib
|
||||
|
||||
if WITH_MAGICK_PLUS_PLUS
|
||||
MAGICKPP_LIBS = Magick++/lib/libMagick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.la
|
||||
MAGICKPP_LDADD = $(MAGICKPP_LIBS) $(top_builddir)/magick/libMagickCore-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.la $(top_builddir)/wand/libMagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.la
|
||||
MAGICKPP_CHECK_PGRMS = $(MAGICKPP_CHECK_PGRMS_OPT)
|
||||
MAGICKPP_MANS = $(MAGICKPP_MANS_OPT)
|
||||
MAGICKPP_PKGCONFIG = $(MAGICKPP_PKGCONFIG_OPT)
|
||||
MAGICKPP_SCRPTS = $(MAGICKPP_SCRPTS_OPT)
|
||||
MAGICKPP_TESTS = $(MAGICKPP_TEST_SCRPTS_OPT)
|
||||
MAGICKPP_TOP_INCHEADERS = $(MAGICKPP_TOP_INCHEADERS_OPT)
|
||||
MAGICKPP_INCHEADERS = $(MAGICKPP_INCHEADERS_OPT)
|
||||
else
|
||||
MAGICKPP_LIBS =
|
||||
MAGICKPP_LDADD =
|
||||
MAGICKPP_CHECK_PGRMS =
|
||||
MAGICKPP_MANS =
|
||||
MAGICKPP_PKGCONFIG =
|
||||
MAGICKPP_SCRPTS =
|
||||
MAGICKPP_TESTS =
|
||||
MAGICKPP_TOP_INCHEADERS =
|
||||
MAGICKPP_INCHEADERS =
|
||||
endif
|
||||
|
||||
MAGICKPP_SCRPTS_OPT = \
|
||||
Magick++/bin/Magick++-config
|
||||
|
||||
MAGICKPP_MANS_OPT = \
|
||||
Magick++/bin/Magick++-config.1
|
||||
|
||||
MAGICKPP_PKGCONFIG_OPT = \
|
||||
Magick++/lib/Magick++.pc \
|
||||
Magick++/lib/ImageMagick++.pc \
|
||||
Magick++/lib/Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc \
|
||||
Magick++/lib/ImageMagick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc
|
||||
|
||||
MAGICKPP_TEST_SCRPTS_OPT = \
|
||||
Magick++/tests/tests.tap \
|
||||
Magick++/demo/demos.tap
|
||||
|
||||
MAGICKPP_EXTRA_DIST = \
|
||||
Magick++/AUTHORS \
|
||||
Magick++/ChangeLog \
|
||||
Magick++/INSTALL \
|
||||
Magick++/LICENSE \
|
||||
Magick++/NEWS \
|
||||
Magick++/README \
|
||||
Magick++/bin/Magick++-config.1 \
|
||||
Magick++/bin/Magick++-config.in \
|
||||
Magick++/lib/ImageMagick++.pc.in \
|
||||
Magick++/lib/libMagick++.map \
|
||||
Magick++/lib/Magick++.pc.in \
|
||||
Magick++/demo/model.miff \
|
||||
Magick++/demo/smile.miff \
|
||||
Magick++/demo/smile_anim.miff \
|
||||
Magick++/demo/tile.miff \
|
||||
$(MAGICKPP_TEST_SCRPTS_OPT) \
|
||||
Magick++/tests/test_image.miff \
|
||||
Magick++/tests/test_image_anim.miff
|
||||
|
||||
MAGICKPP_CLEANFILES = \
|
||||
Magick++/demo/*_out* \
|
||||
Magick++/demo/ir.out \
|
||||
Magick++/tests/colorHistogram.txt \
|
||||
Magick++/tests/testmagick_anim_out.miff \
|
||||
Magick++/tests/ir.out
|
||||
|
||||
Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES = \
|
||||
Magick++/lib/Blob.cpp \
|
||||
Magick++/lib/BlobRef.cpp \
|
||||
Magick++/lib/ChannelMoments.cpp \
|
||||
Magick++/lib/CoderInfo.cpp \
|
||||
Magick++/lib/Color.cpp \
|
||||
Magick++/lib/Drawable.cpp \
|
||||
Magick++/lib/Exception.cpp \
|
||||
Magick++/lib/Functions.cpp \
|
||||
Magick++/lib/Geometry.cpp \
|
||||
Magick++/lib/Image.cpp \
|
||||
Magick++/lib/ImageRef.cpp \
|
||||
Magick++/lib/Montage.cpp \
|
||||
Magick++/lib/Options.cpp \
|
||||
Magick++/lib/Pixels.cpp \
|
||||
Magick++/lib/ResourceLimits.cpp \
|
||||
Magick++/lib/STL.cpp \
|
||||
Magick++/lib/Thread.cpp \
|
||||
Magick++/lib/TypeMetric.cpp \
|
||||
Magick++/lib/Magick++.h \
|
||||
Magick++/lib/Magick++/Blob.h \
|
||||
Magick++/lib/Magick++/BlobRef.h \
|
||||
Magick++/lib/Magick++/ChannelMoments.h \
|
||||
Magick++/lib/Magick++/CoderInfo.h \
|
||||
Magick++/lib/Magick++/Color.h \
|
||||
Magick++/lib/Magick++/Drawable.h \
|
||||
Magick++/lib/Magick++/Exception.h \
|
||||
Magick++/lib/Magick++/Functions.h \
|
||||
Magick++/lib/Magick++/Geometry.h \
|
||||
Magick++/lib/Magick++/Image.h \
|
||||
Magick++/lib/Magick++/ImageRef.h \
|
||||
Magick++/lib/Magick++/Include.h \
|
||||
Magick++/lib/Magick++/Montage.h \
|
||||
Magick++/lib/Magick++/Options.h \
|
||||
Magick++/lib/Magick++/Pixels.h \
|
||||
Magick++/lib/Magick++/ResourceLimits.h \
|
||||
Magick++/lib/Magick++/STL.h \
|
||||
Magick++/lib/Magick++/Thread.h \
|
||||
Magick++/lib/Magick++/TypeMetric.h
|
||||
|
||||
Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS = \
|
||||
$(MAGICKPP_CPPFLAGS) $(LIBRARY_EXTRA_CPPFLAGS)
|
||||
|
||||
magickpptopincdir = $(INCLUDE_PATH)
|
||||
|
||||
magickpptopinc_HEADERS = $(MAGICKPP_TOP_INCHEADERS)
|
||||
|
||||
MAGICKPP_TOP_INCHEADERS_OPT = \
|
||||
Magick++/lib/Magick++.h
|
||||
|
||||
magickppincdir = $(INCLUDE_PATH)/Magick++
|
||||
|
||||
magickppinc_HEADERS = $(MAGICKPP_INCHEADERS)
|
||||
|
||||
MAGICKPP_INCHEADERS_OPT = \
|
||||
Magick++/lib/Magick++/Blob.h \
|
||||
Magick++/lib/Magick++/ChannelMoments.h \
|
||||
Magick++/lib/Magick++/CoderInfo.h \
|
||||
Magick++/lib/Magick++/Color.h \
|
||||
Magick++/lib/Magick++/Drawable.h \
|
||||
Magick++/lib/Magick++/Exception.h \
|
||||
Magick++/lib/Magick++/Functions.h \
|
||||
Magick++/lib/Magick++/Geometry.h \
|
||||
Magick++/lib/Magick++/Image.h \
|
||||
Magick++/lib/Magick++/Include.h \
|
||||
Magick++/lib/Magick++/Montage.h \
|
||||
Magick++/lib/Magick++/Pixels.h \
|
||||
Magick++/lib/Magick++/ResourceLimits.h \
|
||||
Magick++/lib/Magick++/STL.h \
|
||||
Magick++/lib/Magick++/TypeMetric.h
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LDFLAGS_VERSION = -Wl,--version-script=$(top_srcdir)/Magick++/lib/libMagick++.map
|
||||
else
|
||||
Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LDFLAGS_VERSION = -export-symbols-regex ".*"
|
||||
endif
|
||||
|
||||
Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LDFLAGS = -no-undefined \
|
||||
$(Magick___lib_libMagick___la_LDFLAGS_VERSION) $(MAGICK_LT_RELEASE_OPTS) \
|
||||
-version-info \
|
||||
$(MAGICKPP_LIBRARY_CURRENT):$(MAGICKPP_LIBRARY_REVISION):$(MAGICKPP_LIBRARY_AGE)
|
||||
Magick___lib_libMagick___@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LIBADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
|
||||
|
||||
MAGICKPP_CHECK_PGRMS_OPT = \
|
||||
Magick++/demo/analyze \
|
||||
Magick++/demo/button \
|
||||
Magick++/demo/demo \
|
||||
Magick++/demo/detrans \
|
||||
Magick++/demo/flip \
|
||||
Magick++/demo/gravity \
|
||||
Magick++/demo/piddle \
|
||||
Magick++/demo/shapes \
|
||||
Magick++/demo/zoom \
|
||||
Magick++/tests/appendImages \
|
||||
Magick++/tests/attributes \
|
||||
Magick++/tests/averageImages \
|
||||
Magick++/tests/coalesceImages \
|
||||
Magick++/tests/coderInfo \
|
||||
Magick++/tests/color \
|
||||
Magick++/tests/colorHistogram \
|
||||
Magick++/tests/exceptions \
|
||||
Magick++/tests/montageImages \
|
||||
Magick++/tests/morphImages \
|
||||
Magick++/tests/readWriteBlob \
|
||||
Magick++/tests/readWriteImages
|
||||
|
||||
Magick___demo_analyze_SOURCES = Magick++/demo/analyze.cpp
|
||||
Magick___demo_analyze_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_analyze_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_button_SOURCES = Magick++/demo/button.cpp
|
||||
Magick___demo_button_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_button_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_demo_SOURCES = Magick++/demo/demo.cpp
|
||||
Magick___demo_demo_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_demo_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_detrans_SOURCES = Magick++/demo/detrans.cpp
|
||||
Magick___demo_detrans_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_detrans_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_flip_SOURCES = Magick++/demo/flip.cpp
|
||||
Magick___demo_flip_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_flip_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_gravity_SOURCES = Magick++/demo/gravity.cpp
|
||||
Magick___demo_gravity_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_gravity_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_piddle_SOURCES = Magick++/demo/piddle.cpp
|
||||
Magick___demo_piddle_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_piddle_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_shapes_SOURCES = Magick++/demo/shapes.cpp
|
||||
Magick___demo_shapes_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_shapes_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___demo_zoom_SOURCES = Magick++/demo/zoom.cpp
|
||||
Magick___demo_zoom_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___demo_zoom_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_appendImages_SOURCES = Magick++/tests/appendImages.cpp
|
||||
Magick___tests_appendImages_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_appendImages_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_attributes_SOURCES = Magick++/tests/attributes.cpp
|
||||
Magick___tests_attributes_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_attributes_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_averageImages_SOURCES = Magick++/tests/averageImages.cpp
|
||||
Magick___tests_averageImages_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_averageImages_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_coalesceImages_SOURCES = Magick++/tests/coalesceImages.cpp
|
||||
Magick___tests_coalesceImages_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_coalesceImages_CPPFLAGS= $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_coderInfo_SOURCES = Magick++/tests/coderInfo.cpp
|
||||
Magick___tests_coderInfo_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_coderInfo_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_color_SOURCES = Magick++/tests/color.cpp
|
||||
Magick___tests_color_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_color_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_colorHistogram_SOURCES = Magick++/tests/colorHistogram.cpp
|
||||
Magick___tests_colorHistogram_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_colorHistogram_CPPFLAGS= $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_exceptions_SOURCES = Magick++/tests/exceptions.cpp
|
||||
Magick___tests_exceptions_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_exceptions_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_montageImages_SOURCES = Magick++/tests/montageImages.cpp
|
||||
Magick___tests_montageImages_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_montageImages_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_morphImages_SOURCES = Magick++/tests/morphImages.cpp
|
||||
Magick___tests_morphImages_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_morphImages_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_readWriteBlob_SOURCES = Magick++/tests/readWriteBlob.cpp
|
||||
Magick___tests_readWriteBlob_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_readWriteBlob_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
Magick___tests_readWriteImages_SOURCES = Magick++/tests/readWriteImages.cpp
|
||||
Magick___tests_readWriteImages_LDADD = $(MAGICKPP_LDADD)
|
||||
Magick___tests_readWriteImages_CPPFLAGS = $(MAGICKPP_CPPFLAGS)
|
||||
|
||||
MAGICKPP_LOCAL_TARGETS = www/Magick++/NEWS.html www/Magick++/ChangeLog.html
|
@ -1,383 +0,0 @@
|
||||
This file records noteworthy changes in Magick++.
|
||||
|
||||
(5.5.2)
|
||||
* Added adaptiveThreshold() method.
|
||||
* Added colorMapSize() method.
|
||||
* Added DrawablePushClipPath, DrawablePopClipPath, and DrawableClipPath.
|
||||
|
||||
(5.5.1)
|
||||
* Fixed a Color memory allocation problem which became evident when
|
||||
using the Magick++ DLL.
|
||||
* Completed implementation of Image textEncoding() method. Oops!
|
||||
|
||||
(5.4.9)
|
||||
* Added the Image textEncoding() method and an encoding option to
|
||||
DrawableText to support specifying "UTF-8" (Unicode) text encoding.
|
||||
* Added the Image compare() method to support comparing two similar
|
||||
images and obtaining error values.
|
||||
* Magick++ compiles as a DLL under Visual C++ 7.0.
|
||||
|
||||
(5.4.8)
|
||||
* The image type() method now also specifies the output image type
|
||||
to use while writing.
|
||||
* Added a profile() method to Image to support adding, removing,
|
||||
and retrieving named embedded application profiles.
|
||||
* Magick++ compiles as a DLL under Visual C++ 6.0.
|
||||
|
||||
(5.4.7)
|
||||
* No changes to report.
|
||||
|
||||
(5.4.6)
|
||||
* Magick++ library no longer depends on C++ iostreams APIs.
|
||||
* Added DrawableTextUnderColor class to set text underbox color.
|
||||
|
||||
(5.4.5)
|
||||
* Drawable classes have been re-written to use ImageMagick's draw.h
|
||||
APIs.
|
||||
* Fixed a nasty bug when reporting some forms of errors. The bug
|
||||
was causing an exception in error.c.
|
||||
* Template API implementation cleanup.
|
||||
* Rationalized some parameter types.
|
||||
* New method, Pixels::getConst() to obtain read-only pixels.
|
||||
* DrawableDashArray() prefers an array of type 'double' rather than
|
||||
'unsigned int'. Please use the new form.
|
||||
* Composite images are output as embedded inlined Base64 when
|
||||
preparing MVG data.
|
||||
* Blob class supports encoding and decoding Base64 data.
|
||||
* New method, Image::ping to ping a Blob.
|
||||
|
||||
(5.4.4)
|
||||
* Fixed a bug in DrawableDashArray.
|
||||
* Numerous consistency improvements based on findings from Gimpel lint.
|
||||
* Added endian method to Image, and endianImage class to STL.h in
|
||||
order to support setting endian option for formats which support
|
||||
the notion (e.g. TIFF).
|
||||
* DrawableCompositeImage was not working. Now it does.
|
||||
|
||||
(5.4.3)
|
||||
* Support selecting fonts via font-family, font-style, font-weight,
|
||||
and font-stretch via the DrawableFont class.
|
||||
* CoderInfo API change. MatchType is scoped to CoderInfo class.
|
||||
* Bugfix for Magick::Exception memory leak.
|
||||
* Bugfix for DrawableGravity class (had stopped working).
|
||||
* Bugfix for Image antiAlias() method (wasn't working).
|
||||
* Reimplemented image registration code (which passes image via
|
||||
DrawableCompositeImage).
|
||||
|
||||
(5.4.2)
|
||||
* TypeMetric class revamped to match current ImageMagick type metrics
|
||||
definition.
|
||||
* Fixed possible stack corruption on some architectures when returning
|
||||
Color as a string.
|
||||
* DrawableCompositeImage can be constructed based on an Image in memory
|
||||
rather than just a filename.
|
||||
* Added Drawable objects (DrawablePushPattern & DrawablePopPattern)
|
||||
for definining arbitrary named patterns to be used for stroke and fill.
|
||||
* Added Image strokePattern() and fillPattern() methods for specifying
|
||||
image to use while drawing stroked object outlines and while filling
|
||||
objects, respectively.
|
||||
|
||||
(5.4.1)
|
||||
* Fixed memory leak in Image::draw().
|
||||
|
||||
* Automagically cleans up ImageMagick allocations prior to process
|
||||
exit to avoid annoying memory leak tools.
|
||||
|
||||
(5.4.0)
|
||||
* Fixed bug when scaling from Quantum to double in derived Color classes.
|
||||
|
||||
* Pass all input parameter strings as 'const std::string &' in Color class.
|
||||
|
||||
* Added support for obtaining pixel indexes.
|
||||
|
||||
* Implemented support for read-only pixels and pixel indexes.
|
||||
|
||||
* Added Image boundingBox() method to return smallest bounding box
|
||||
enclosing non-border pixels.
|
||||
|
||||
(5.3.9)
|
||||
* New class, CoderInfo, to return information for a specified image
|
||||
format as well as the coderInfoList() template function to return
|
||||
the list of coders which match a specification.
|
||||
|
||||
* User now may tell Blob updateNoCopy() what memory system (C or C++)
|
||||
the memory was allocated from. Used to assume the C++ allocator.
|
||||
This resolves a bug on some platforms (e.g. Windows).
|
||||
|
||||
* Added Image 'opacity' method (and STL opacityImage()) to set, or
|
||||
attenuate, image opacity.
|
||||
|
||||
* Added Image 'type' method (and STL typeImage()) to set image
|
||||
representation type.
|
||||
|
||||
* Image depth method now adjusts pixels to match specified image depth,
|
||||
and reports depth based on current image pixels.
|
||||
|
||||
(5.3.8)
|
||||
* New class 'TypeMetric' to contain font type metrics.
|
||||
|
||||
* New Image method 'fontTypeMetrics()' to obtain font type metrics.
|
||||
|
||||
* Image colorMap method automatically extends the colormap if index
|
||||
is past the end of the current colormap.
|
||||
|
||||
* Added clipMask method to add a clip mask to the current
|
||||
image. Prevents modification to image pixels wherever the
|
||||
associated clip mask image is tranparent.
|
||||
|
||||
* Documented methods which were added previously, but left
|
||||
undocumented.
|
||||
|
||||
(5.3.7)
|
||||
* No changes.
|
||||
|
||||
(5.3.6)
|
||||
* Adjusted parameters to 'edge' and 'medianFilter' to match
|
||||
equivalent libMagick functions.
|
||||
* Fixed a Montage bug which was not allowing color options to be unset.
|
||||
* Montage defaults are no longer taken from first Image in list.
|
||||
* Magick++ demo output looks like PerlMagick demo output again.
|
||||
|
||||
(5.3.5)
|
||||
* Default radius and sigma parameters were changed on the blur,
|
||||
charcoal, emboss, and sharpen methods to match ImageMagick defaults.
|
||||
* Fixes to Magick++ demos to restore appearance.
|
||||
* Added shave method for shaving edges from image (a form of crop).
|
||||
|
||||
(5.3.1-5.3.4)
|
||||
* No changes.
|
||||
|
||||
(5.3.0)
|
||||
* Released with ImageMagick 5.3.0
|
||||
* Bug fix. Under certain conditions, several annotation options
|
||||
were being reset.
|
||||
|
||||
(5.2.9)
|
||||
* Released with ImageMagick 5.2.9
|
||||
* Added fillRule method to Image class.
|
||||
|
||||
(5.2.8)
|
||||
* Released with ImageMagick 5.2.8
|
||||
* Added 'fill' and 'stroke' methods to Montage class.
|
||||
* Added 'erase' and 'strokeAntiAlias' methods to Image class.
|
||||
* Renamed Image class 'layer' method to 'channel'.
|
||||
* Support supplying composition rule to DrawableCompositeImage.
|
||||
|
||||
(5.2.7)
|
||||
* Released with ImageMagick 5.2.7
|
||||
* Added convolve and unsharpmask methods to Image.
|
||||
* Added deconstructImages and mosaicImages template functions.
|
||||
* Fixed handling of geometry parameter to annotate method.
|
||||
|
||||
(5.2.6)
|
||||
* Released with ImageMagick 5.2.6.
|
||||
* Added support for a SVG-style dash array and dash offset
|
||||
parameters (for drawing dashed lines).
|
||||
* Added support for setting the shape to be used at the end of open
|
||||
subpaths when they are stroked.
|
||||
* Added support for setting the shape to be used at the corners of
|
||||
paths (or other vector shapes) when they are stroked.
|
||||
* Added support for setting extension limit for miter joins.
|
||||
* Rotate text the proper way using an affine transform.
|
||||
|
||||
(5.2.5)
|
||||
* Released with ImageMagick 5.2.5.
|
||||
* Completely re-wrote drawable object classes in order to support
|
||||
all current ImageMagick drawing capabilities using a list-based paradigm.
|
||||
New drawing capabilities include coordinate transformations and the
|
||||
currently undocumented (but quite powerful) path capabilities.
|
||||
|
||||
(5.2.4)
|
||||
* Released with ImageMagick 5.2.4.
|
||||
* Magick++ is now built by the regular ImageMagick build process.
|
||||
when --with-magick_plus_plus is specified to configure.
|
||||
* Fixed bug with setting text drawing options.
|
||||
* Fixed API bug with colorize. Options adjusted to match ImageMagick
|
||||
API change (API change was long ago).
|
||||
* Library compiles using Sun Workshop 5.0 compiler. Linkage problems with
|
||||
some demos/tests due to libtool-related compiler/linker bug.
|
||||
* Compiles using Sun Forte 6.0 compiler.
|
||||
|
||||
(5.2.3)
|
||||
* Switched to new release numbering (match ImageMagick release number)
|
||||
* Released with ImageMagick 5.2.3.
|
||||
* Fixed bug in which the Image read method was not reporting
|
||||
warnings (only errors).
|
||||
* Parameter changes to blur, charcoal, emboss, and sharpen methods
|
||||
of the Image class to match equivalent ImageMagick API changes.
|
||||
* Parameter changes to blurImage, charcoalImage, embossImage, and
|
||||
sharpenImage STL functions in order to match equivalent ImageMagick
|
||||
API changes.
|
||||
|
||||
(0.9.5)
|
||||
* Released with ImageMagick 5.2.2.
|
||||
|
||||
(0.9.4)
|
||||
* Released with ImageMagick 5.2.1.
|
||||
* Bugfix to the Pixels GetIndexes() method.
|
||||
* Adapted to ImageMagick 5.2.1's revised matte channel interpretation.
|
||||
|
||||
(0.9.3)
|
||||
* Released with ImageMagick 5.2
|
||||
* New class 'Pixels' to support low-level pixel access in image. New
|
||||
API supports multiple pixel views into the same image. Number of
|
||||
available pixel views limited to the number of image rows + 1.
|
||||
* Dramatically improved performance for text annotation and drawing.
|
||||
* Fix text annotation bug which did not allow spaces in annotation text.
|
||||
* Added gaussianBlurImage() method.
|
||||
* Fixed bug in floodFillTexture().
|
||||
* Re-worked error reporting methodology to use re-entrant error
|
||||
reporting rather than the previous method (based on call-backs)
|
||||
which required thread specific data.
|
||||
* Should be thread-safe under Win32 now.
|
||||
|
||||
(0.9.2)
|
||||
* Released with ImageMagick 5.1.1
|
||||
* Should be thread-safe when used with POSIX threads (pthreads).
|
||||
* Added methods getPixels, setPixels, syncPixels, readPixels, and
|
||||
writePixels, in order to provide low-level access to Image pixels.
|
||||
* Bugfix: size method was setting Options size, but not Image rows
|
||||
and columns.
|
||||
|
||||
(0.9.1)
|
||||
* Released with ImageMagick 5.1.0
|
||||
* Added additional constructors, read, and write methods for BLOBs
|
||||
to make BLOBs easier to use.
|
||||
* Added the medianFilter() method to Image.
|
||||
* Renamed transformColorSpace() to colorSpace() and added a
|
||||
colorSpace() accessor method.
|
||||
* Renamed psPageSize() to page(), which now properly returns the
|
||||
actual attribute from the image, rather than the image options.
|
||||
This is important in order to manipulate GIF animations.
|
||||
* Bug fixes.
|
||||
|
||||
(0.9)
|
||||
* Ported to ImageMagick 5.0.
|
||||
* BLOB sizes are now specified using size_t type.
|
||||
* Rotate() no longer accepts sharpen or crop options.
|
||||
* Shear() No longer accepts a crop option.
|
||||
* FontPointsize() now takes a double.
|
||||
* The condense, uncondense, and condensed methods have been removed
|
||||
since ImageMagick 5.0 no longer uses run-length encoding.
|
||||
* The quantizeError method has been removed since it never worked.
|
||||
* The cacheThreshold method is added to set the threshold of
|
||||
ImageMagick's image cache.
|
||||
|
||||
(0.8.9)
|
||||
* Released with ImageMagick 4.2.9
|
||||
* Blob reference counting was totally broken, leading to a memory
|
||||
leak if it was used. Fixed by starting reference count from one
|
||||
rather than zero.
|
||||
|
||||
(0.8.8)
|
||||
* Fixed a Image constructor bug when constructing from a Blob
|
||||
|
||||
(0.8.7)
|
||||
* Bugfix: condensed() was returning wrong state.
|
||||
|
||||
(0.8.6)
|
||||
* Color is now based on ImageMagick's RunlengthPacket structure (via a
|
||||
pointer) so that it may eventually be used to represent an image
|
||||
pixel. This is currently a work in progress.
|
||||
|
||||
(0.8.5)
|
||||
* Headers are now installed under prefix/include/Magick++ on Unix
|
||||
systems with the exception that Magick++.h is installed under
|
||||
prefix/include as it was before. Programs which include Magick++.h
|
||||
(the documented approach) should not be impacted.
|
||||
* Image constructors to construct an image from a BLOB.
|
||||
* Image read and write methods to decode and encode images stored in a
|
||||
BLOB. This allows reading/writing image "files" from/to memory rather
|
||||
than a traditional file.
|
||||
|
||||
(0.8.4)
|
||||
* New mapImages algorithm maps a sequence of images to the colormap of
|
||||
a provided image.
|
||||
* New quantizeImages algorithm computes and applies a common colormap
|
||||
to a sequence of images.
|
||||
|
||||
(0.8.3)
|
||||
* Ported to ImageMagick 4.2.6.
|
||||
* Blob supports default constructor.
|
||||
* New Blob method updateNoCopy() to support efficient initialization by
|
||||
derived class.
|
||||
|
||||
(0.8.2)
|
||||
* Uses libtool 1.3 to build library under Unix and Cygwin (static lib only).
|
||||
* Added Blob class to support supplying formatted binary data to methods.
|
||||
* Added support for setting ICC and IPTC profiles from a binary BLOB.
|
||||
* Added support for transformations of image data to/from alternate
|
||||
colorspace (e.g. CYMK).
|
||||
* Added support for 'pinging' an image (get image dimensions/size quickly).
|
||||
* Added 'uncondense' method to de-compress in-memory image data.
|
||||
* Added support for annotation using rotated text.
|
||||
|
||||
(0.8.1)
|
||||
* Added support for setting alpha in Magick::Color
|
||||
* Set/get color alpha in Magick::Image::pixelColor() for DirectClass images.
|
||||
|
||||
(0.8)
|
||||
* Transitioned to Beta
|
||||
* Improved Microsoft Visual C++ build environment.
|
||||
|
||||
(0.7.4)
|
||||
* Added animateImages() and displayImages() to MagickSTL.h.
|
||||
* Added function objects to support setting image attributes.
|
||||
|
||||
(0.7.3)
|
||||
* Image::penTexture() now takes Image reference rather than
|
||||
Image pointer. Set Image to invalid using isValid(false)
|
||||
to unset texture.
|
||||
* Attribute methods that take Color, Geometry, Image, or string
|
||||
arguments may now unset the attribute by setting the state of
|
||||
the object to invalid using isValid(false), or the empty string
|
||||
(in the case of string). This allows full control over ImageMagick
|
||||
attributes which are stored as C strings which may be set to NULL.
|
||||
* Updated for ImageMagick 4.2.1
|
||||
|
||||
(0.7.2)
|
||||
* Added STL function object support for all Image manipulation
|
||||
methods to support operating on all or part of the images
|
||||
stored in an STL container.
|
||||
|
||||
(0.7.1)
|
||||
* Added Coordinate class and methods in Drawable to support x,y
|
||||
coordinates.
|
||||
* Changed coordinate parameters from unsigned int to double in Drawable.
|
||||
* Changed polygon methods in Drawable to use STL list argument.
|
||||
* Added STL list based draw method to Image.
|
||||
* Changed Exception heirarchy to support Warning and Error sub-classes.
|
||||
Most exception class names have changed.
|
||||
|
||||
(0.7)
|
||||
* Updated for ImageMagick 4.2.0
|
||||
* Added support for flood-filling and drawing with texture.
|
||||
* Montage supported.
|
||||
* Oodles of bugs fixed.
|
||||
* Implemented image attribute tests.
|
||||
* Implemented PerlMagick 'demo' and 'shapes' demo programs in Magick++.
|
||||
* Some parameters re-ordered due to experience from writing demo programs.
|
||||
|
||||
(0.6)
|
||||
* Initial support for integrating image-list oriented operations with
|
||||
STL containers.
|
||||
|
||||
(0.5)
|
||||
* Compiles and runs under Unix using egcs release 1.1 or later.
|
||||
* Compiles and runs under Windows using Visual C++ 5.X or later.
|
||||
* Users of Magick++ API are not exposed to ImageMagick headers.
|
||||
* Magick++ API is namespaced under "Magick".
|
||||
* "Magick" prefix removed from object names.
|
||||
* User options are now completely contained within Image object.
|
||||
There is no longer a MagickOptions parameter to some methods.
|
||||
|
||||
(0.1)
|
||||
* All ImageMagick operations which operate on individual images are
|
||||
supported.
|
||||
* Image objects have value semantics, avoid unnecessary image
|
||||
copies through the use of reference counting, and may be compared
|
||||
via standard operators.
|
||||
* Geometry, color, annotations, and user-options are supported by
|
||||
separate classes.
|
||||
* Errors are reported synchronously via C++ exceptions.
|
||||
|
@ -1,55 +0,0 @@
|
||||
This is Magick++, the object-oriented C++ API to the ImageMagick
|
||||
image-processing library, the most comprehensive open-source image processing
|
||||
solution available. Read the release notes for Magick++.
|
||||
|
||||
Magick++ supports an object model which is inspired by PerlMagick. Magick++
|
||||
executes faster than PerlMagick since it is accessed from a compiled language
|
||||
rather than from a scripting language. This makes it more suitable for Web CGI
|
||||
programs which must start-up and execute quickly. Images support implicit
|
||||
reference counting so that copy constructors and assignment incur almost no
|
||||
cost. The cost of actually copying an image (if necessary) is done just before
|
||||
modification and this copy is managed automatically by Magick++. De-referenced
|
||||
copies are automatically deleted. The image objects support value (rather than
|
||||
pointer) semantics so it is trivial to support multiple generations of an
|
||||
image in memory at one time.
|
||||
|
||||
Magick++ provides integrated support for the Standard Template Library (STL) so
|
||||
that the powerful containers available (e.g. deque, vector, list, and map) can
|
||||
be used to write programs similar to those possible with PERL & PerlMagick.
|
||||
STL-compatable template versions of ImageMagick's list-style operations are
|
||||
provided so that operations may be performed on multiple images stored in STL
|
||||
containers.
|
||||
|
||||
Documentation
|
||||
|
||||
Detailed documentation are provided for all Magick++ classes, class methods,
|
||||
and template functions which comprise the API.
|
||||
|
||||
Obtaining Magick++
|
||||
|
||||
Magick++ is included as part of ImageMagick source releases and may be
|
||||
retrieved via ftp or Subversion.
|
||||
|
||||
Installation
|
||||
|
||||
Once you have the sources available, follow these detailed installation
|
||||
instructions for UNIX and Windows.
|
||||
|
||||
Usage
|
||||
|
||||
A helper script named Magick++-config is installed under Unix which assists
|
||||
with recalling compilation options required to compile and link programs which
|
||||
use Magick++. For example, the following command will compile and link the
|
||||
source file example.cpp to produce the executable example (notice that quotes
|
||||
are backward quotes):
|
||||
|
||||
c++ `Magick++-config --cxxflags --cppflags --ldflags --libs` \
|
||||
-o example example.cpp
|
||||
|
||||
Windows users may get started by manually editing a project file for one of the
|
||||
Magick++ demo programs.
|
||||
|
||||
Reporting Bugs
|
||||
|
||||
Please report any bugs via the Magick++ Bug Tracking System at
|
||||
https://imagemagick.org/discourse-server/.
|
@ -1,99 +0,0 @@
|
||||
.ad l
|
||||
.nh
|
||||
.TH Magick++-Config 1 "2 May 2002" "ImageMagick"
|
||||
.SH NAME
|
||||
Magick++-config \- get information about the installed version of Magick++
|
||||
.SH SYNOPSIS
|
||||
.B Magick++-config
|
||||
.B [--cppflags]
|
||||
.B [--cxxflags]
|
||||
.B [--exec-prefix]
|
||||
.B [--ldflags]
|
||||
.B [--libs]
|
||||
.B [--prefix]
|
||||
.B [--version]
|
||||
.SH DESCRIPTION
|
||||
.B Magick++-config
|
||||
prints the compiler and linker flags required to compile and link programs
|
||||
that use the
|
||||
.BR ImageMagick
|
||||
C++ Application Programmer Interface (known as
|
||||
.BR Magick++
|
||||
).
|
||||
.SH EXAMPLES
|
||||
To print the version of the installed distribution of
|
||||
.BR Magick++ ,
|
||||
use:
|
||||
|
||||
.nf
|
||||
Magick++-config \-\-version
|
||||
.fi
|
||||
|
||||
To compile a program that calls the
|
||||
.BR ImageMagick
|
||||
C++ Application Programmer Interface, use:
|
||||
|
||||
.nf
|
||||
c++ `Magick++-config \-\-cxxflags \-\-cppflags \-\-ldflags \-\-libs` program.cpp
|
||||
.fi
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-\-cppflags
|
||||
Print the preprocessor flags that are needed to find the
|
||||
.B ImageMagick
|
||||
C and C++ include files and defines to ensures that the ImageMagick data structures match between
|
||||
your program and the installed libraries.
|
||||
.TP
|
||||
.B \-\-cxxflags
|
||||
Print the compiler flags that were used to compile
|
||||
.BR libMagick++ .
|
||||
.TP
|
||||
.B \-\-exec-prefix
|
||||
Print the directory under which target specific binaries and executables are installed.
|
||||
.TP
|
||||
.B \-\-ldflags
|
||||
Print the linker flags that are needed to link with the
|
||||
.B libMagick++
|
||||
library.
|
||||
.TP
|
||||
.B \-\-libs
|
||||
Print the linker flags that are needed to link a program with
|
||||
.BR libMagick++ .
|
||||
.TP
|
||||
.B \-\-prefix
|
||||
Print the directory under which the package is installed.
|
||||
.TP
|
||||
.B \-\-version
|
||||
Print the version of the
|
||||
.B ImageMagick
|
||||
distribution to standard output.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2000 ImageMagick Studio LLC, a non-profit organization dedicated
|
||||
to making software imaging solutions freely available.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files ("ImageMagick"),
|
||||
to deal in ImageMagick without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of ImageMagick, and to permit persons to whom the
|
||||
ImageMagick is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of ImageMagick.
|
||||
|
||||
The software is provided "as is", without warranty of any kind, express or
|
||||
implied, including but not limited to the warranties of merchantability,
|
||||
fitness for a particular purpose and noninfringement. In no event shall
|
||||
ImageMagick Studio be liable for any claim, damages or other liability,
|
||||
whether in an action of contract, tort or otherwise, arising from, out of
|
||||
or in connection with ImageMagick or the use or other dealings in
|
||||
ImageMagick.
|
||||
|
||||
Except as contained in this notice, the name of the ImageMagick Studio
|
||||
shall not be used in advertising or otherwise to promote the sale, use or
|
||||
other dealings in ImageMagick without prior written authorization from the
|
||||
ImageMagick Studio.
|
||||
.SH AUTHORS
|
||||
Bob Friesenhahn, ImageMagick Studio
|
||||
|
@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configure options script for re-calling Magick+ compilation options
|
||||
# required to use the Magick++ library.
|
||||
#
|
||||
#
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
|
||||
usage='Usage: Magick++-config [--cppflags] [--cxxflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]
|
||||
|
||||
For example, "magick.cpp" may be compiled to produce "magick" as follows:
|
||||
|
||||
"c++ -o magick magick.cpp `Magick++-config --cppflags --cxxflags --ldflags --libs`"'
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
;;
|
||||
--prefix)
|
||||
echo $prefix
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo '@PACKAGE_BASEVERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
|
||||
;;
|
||||
--cflags)
|
||||
@PKG_CONFIG@ --cflags Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
;;
|
||||
--cxxflags)
|
||||
@PKG_CONFIG@ --cflags Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
;;
|
||||
--cppflags)
|
||||
@PKG_CONFIG@ --cflags Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
;;
|
||||
--ldflags)
|
||||
@PKG_CONFIG@ --libs Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
;;
|
||||
--libs)
|
||||
@PKG_CONFIG@ --libs Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
@ -1,71 +0,0 @@
|
||||
//
|
||||
// Demonstrate using the 'analyze' process module to compute
|
||||
// image statistics.
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2003, 2004
|
||||
//
|
||||
// Usage: analyze file...
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <list>
|
||||
using namespace std;
|
||||
using namespace Magick;
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if ( argc < 2 )
|
||||
{
|
||||
cout << "Usage: " << argv[0] << " file..." << endl;
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
{
|
||||
std::list<std::string> attributes;
|
||||
|
||||
attributes.push_back("TopLeftColor");
|
||||
attributes.push_back("TopRightColor");
|
||||
attributes.push_back("BottomLeftColor");
|
||||
attributes.push_back("BottomRightColor");
|
||||
attributes.push_back("filter:brightness:mean");
|
||||
attributes.push_back("filter:brightness:standard-deviation");
|
||||
attributes.push_back("filter:brightness:kurtosis");
|
||||
attributes.push_back("filter:brightness:skewness");
|
||||
attributes.push_back("filter:saturation:mean");
|
||||
attributes.push_back("filter:saturation:standard-deviation");
|
||||
attributes.push_back("filter:saturation:kurtosis");
|
||||
attributes.push_back("filter:saturation:skewness");
|
||||
|
||||
char **arg = &argv[1];
|
||||
while ( *arg )
|
||||
{
|
||||
string fname(*arg);
|
||||
try {
|
||||
cout << "File: " << fname << endl;
|
||||
Image image( fname );
|
||||
|
||||
/* Analyze module does not require an argument list */
|
||||
image.process("analyze",0,0);
|
||||
|
||||
list<std::string>::iterator pos = attributes.begin();
|
||||
while(pos != attributes.end())
|
||||
{
|
||||
cout << " " << setw(16) << setfill(' ') << setiosflags(ios::left)
|
||||
<< *pos << " = " << image.attribute(*pos) << endl;
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << error_.what() << endl;
|
||||
}
|
||||
++arg;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
//
|
||||
// Magick++ demo to generate a simple text button
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Options
|
||||
//
|
||||
|
||||
string backGround = "xc:#CCCCCC"; // A solid color
|
||||
|
||||
// Color to use for decorative border
|
||||
Color border = "#D4DCF3";
|
||||
|
||||
// Button size
|
||||
string buttonSize = "120x20";
|
||||
|
||||
// Button background texture
|
||||
string buttonTexture = "granite:";
|
||||
|
||||
// Button text
|
||||
string text = "Button Text";
|
||||
|
||||
// Button text color
|
||||
string textColor = "red";
|
||||
|
||||
// Font point size
|
||||
int fontPointSize = 16;
|
||||
|
||||
//
|
||||
// Magick++ operations
|
||||
//
|
||||
|
||||
Image button;
|
||||
|
||||
// Set button size
|
||||
button.size( buttonSize );
|
||||
|
||||
// Read background image
|
||||
button.read( backGround );
|
||||
|
||||
// Set background to buttonTexture
|
||||
Image backgroundTexture( buttonTexture );
|
||||
button.texture( backgroundTexture );
|
||||
|
||||
// Add some text
|
||||
button.fillColor( textColor );
|
||||
button.fontPointsize( fontPointSize );
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
button.font(string(getenv("MAGICK_FONT")));
|
||||
button.annotate( text, CenterGravity );
|
||||
|
||||
// Add a decorative frame
|
||||
button.borderColor( border );
|
||||
button.frame( "6x6+3+3" );
|
||||
|
||||
button.depth( 8 );
|
||||
|
||||
// Quantize to desired colors
|
||||
// button.quantizeTreeDepth(8);
|
||||
button.quantizeDither(false);
|
||||
button.quantizeColors(64);
|
||||
button.quantize();
|
||||
|
||||
// Save to file
|
||||
cout << "Writing to \"button_out.miff\" ..." << endl;
|
||||
button.compressType( RLECompression );
|
||||
button.write("button_out.miff");
|
||||
|
||||
// Display on screen
|
||||
// button.display();
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,516 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
//
|
||||
// Simple demo program for Magick++
|
||||
//
|
||||
// Concept and algorithms lifted from PerlMagick demo script written
|
||||
// by John Christy.
|
||||
//
|
||||
// Max run-time size 60MB (as compared with 95MB for PerlMagick) under SPARC Solaris
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
list<Image> montage;
|
||||
|
||||
{
|
||||
//
|
||||
// Read model & smile image.
|
||||
//
|
||||
cout << "Read images ..." << endl;
|
||||
|
||||
Image model( srcdir + "model.miff" );
|
||||
model.label( "Magick++" );
|
||||
model.borderColor( "black" );
|
||||
model.backgroundColor( "black" );
|
||||
|
||||
Image smile( srcdir + "smile.miff" );
|
||||
smile.label( "Smile" );
|
||||
smile.borderColor( "black" );
|
||||
|
||||
//
|
||||
// Create image stack.
|
||||
//
|
||||
cout << "Creating thumbnails..." << endl;
|
||||
|
||||
// Construct initial list containing seven copies of a null image
|
||||
Image null;
|
||||
null.size( Geometry(70,70) );
|
||||
null.read( "NULL:black" );
|
||||
list<Image> images( 7, null );
|
||||
|
||||
Image example = model;
|
||||
|
||||
// Each of the following follow the pattern
|
||||
// 1. obtain reference to (own copy of) image
|
||||
// 2. apply label to image
|
||||
// 3. apply operation to image
|
||||
// 4. append image to container
|
||||
|
||||
cout << " add noise ..." << endl;
|
||||
example.label( "Add Noise" );
|
||||
example.addNoise( LaplacianNoise );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " add noise (blue) ..." << endl;
|
||||
example.label( "Add Noise\n(Blue Channel)" );
|
||||
example.addNoiseChannel( BlueChannel, PoissonNoise );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " annotate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Annotate" );
|
||||
example.density( "72x72" );
|
||||
example.fontPointsize( 18 );
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
example.font(string(getenv("MAGICK_FONT")));
|
||||
example.strokeColor( Color() );
|
||||
example.fillColor( "gold" );
|
||||
example.annotate( "Magick++", "+0+20", NorthGravity );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " blur ..." << endl;
|
||||
example = model;
|
||||
example.label( "Blur" );
|
||||
example.blur( 0, 1.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " blur red channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Blur Channel\n(Red Channel)" );
|
||||
example.blurChannel( RedChannel, 0, 3.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " border ..." << endl;
|
||||
example = model;
|
||||
example.label( "Border" );
|
||||
example.borderColor( "gold" );
|
||||
example.border( Geometry(6,6) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Channel\n(Red Channel)" );
|
||||
example.channel( RedChannel );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " charcoal ..." << endl;
|
||||
example = model;
|
||||
example.label( "Charcoal" );
|
||||
example.charcoal( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " composite ..." << endl;
|
||||
example = model;
|
||||
example.label( "Composite" );
|
||||
example.composite( smile, "+35+65", OverCompositeOp);
|
||||
images.push_back( example );
|
||||
|
||||
cout << " contrast ..." << endl;
|
||||
example = model;
|
||||
example.label( "Contrast" );
|
||||
example.contrast( false );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " convolve ..." << endl;
|
||||
example = model;
|
||||
example.label( "Convolve" );
|
||||
{
|
||||
// 3x3 matrix
|
||||
const double kernel[] = { 1, 1, 1, 1, 4, 1, 1, 1, 1 };
|
||||
example.convolve( 3, kernel );
|
||||
}
|
||||
images.push_back( example );
|
||||
|
||||
cout << " crop ..." << endl;
|
||||
example = model;
|
||||
example.label( "Crop" );
|
||||
example.crop( "80x80+25+50" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " despeckle ..." << endl;
|
||||
example = model;
|
||||
example.label( "Despeckle" );
|
||||
example.despeckle( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " draw ..." << endl;
|
||||
example = model;
|
||||
example.label( "Draw" );
|
||||
example.fillColor(Color());
|
||||
example.strokeColor( "gold" );
|
||||
example.strokeWidth( 2 );
|
||||
example.draw( DrawableCircle( 60,90, 60,120 ) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " edge ..." << endl;
|
||||
example = model;
|
||||
example.label( "Detect Edges" );
|
||||
example.edge( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " emboss ..." << endl;
|
||||
example = model;
|
||||
example.label( "Emboss" );
|
||||
example.emboss( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " equalize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Equalize" );
|
||||
example.equalize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " explode ..." << endl;
|
||||
example = model;
|
||||
example.label( "Explode" );
|
||||
example.backgroundColor( "#000000FF" );
|
||||
example.implode( -1 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " flip ..." << endl;
|
||||
example = model;
|
||||
example.label( "Flip" );
|
||||
example.flip( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " flop ..." << endl;
|
||||
example = model;
|
||||
example.label( "Flop" );
|
||||
example.flop();
|
||||
images.push_back( example );
|
||||
|
||||
cout << " frame ..." << endl;
|
||||
example = model;
|
||||
example.label( "Frame" );
|
||||
example.frame( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gamma ..." << endl;
|
||||
example = model;
|
||||
example.label( "Gamma" );
|
||||
example.gamma( 1.6 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gaussian blur ..." << endl;
|
||||
example = model;
|
||||
example.label( "Gaussian Blur" );
|
||||
example.gaussianBlur( 0.0, 1.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gaussian blur channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Gaussian Blur\n(Green Channel)" );
|
||||
example.gaussianBlurChannel( GreenChannel, 0.0, 1.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gradient ..." << endl;
|
||||
Image gradient;
|
||||
gradient.size( "130x194" );
|
||||
gradient.read( "gradient:#20a0ff-#ffff00" );
|
||||
gradient.label( "Gradient" );
|
||||
images.push_back( gradient );
|
||||
|
||||
cout << " grayscale ..." << endl;
|
||||
example = model;
|
||||
example.label( "Grayscale" );
|
||||
example.quantizeColorSpace( GRAYColorspace );
|
||||
example.quantize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " implode ..." << endl;
|
||||
example = model;
|
||||
example.label( "Implode" );
|
||||
example.implode( 0.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " level ..." << endl;
|
||||
example = model;
|
||||
example.label( "Level" );
|
||||
example.level( 0.20*QuantumRange, 0.90*QuantumRange, 1.20 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " level red channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Level Channel\n(Red Channel)" );
|
||||
example.levelChannel( RedChannel, 0.20*QuantumRange, 0.90*QuantumRange, 1.20 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " median filter ..." << endl;
|
||||
example = model;
|
||||
example.label( "Median Filter" );
|
||||
example.medianFilter( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " modulate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Modulate" );
|
||||
example.modulate( 110, 110, 110 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " monochrome ..." << endl;
|
||||
example = model;
|
||||
example.label( "Monochrome" );
|
||||
example.quantizeColorSpace( GRAYColorspace );
|
||||
example.quantizeColors( 2 );
|
||||
example.quantizeDither( false );
|
||||
example.quantize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " motion blur ..." << endl;
|
||||
example = model;
|
||||
example.label( "Motion Blur" );
|
||||
example.motionBlur( 0.0, 7.0,45 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " negate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Negate" );
|
||||
example.negate( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " normalize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Normalize" );
|
||||
example.normalize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " oil paint ..." << endl;
|
||||
example = model;
|
||||
example.label( "Oil Paint" );
|
||||
example.oilPaint( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither 2x2 ..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(2x2)" );
|
||||
example.randomThreshold( Geometry(2,2) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither 3x3..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(3x3)" );
|
||||
example.randomThreshold( Geometry(3,3) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither 4x4..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(4x4)" );
|
||||
example.randomThreshold( Geometry(4,4) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither red 4x4..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(Red 4x4)" );
|
||||
example.randomThresholdChannel( Geometry(4,4), RedChannel);
|
||||
images.push_back( example );
|
||||
|
||||
cout << " plasma ..." << endl;
|
||||
Image plasma;
|
||||
plasma.size( "130x194" );
|
||||
plasma.read( "plasma:fractal" );
|
||||
plasma.label( "Plasma" );
|
||||
images.push_back( plasma );
|
||||
|
||||
cout << " quantize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Quantize" );
|
||||
example.quantize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " quantum operator ..." << endl;
|
||||
example = model;
|
||||
example.label( "Quantum Operator\nRed * 0.4" );
|
||||
example.quantumOperator( RedChannel,MultiplyEvaluateOperator,0.40 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " raise ..." << endl;
|
||||
example = model;
|
||||
example.label( "Raise" );
|
||||
example.raise( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " reduce noise ..." << endl;
|
||||
example = model;
|
||||
example.label( "Reduce Noise" );
|
||||
example.reduceNoise( 1.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " resize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Resize" );
|
||||
example.zoom( "50%" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " roll ..." << endl;
|
||||
example = model;
|
||||
example.label( "Roll" );
|
||||
example.roll( "+20+10" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " rotate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Rotate" );
|
||||
example.rotate( 45 );
|
||||
example.transparent( "black" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " scale ..." << endl;
|
||||
example = model;
|
||||
example.label( "Scale" );
|
||||
example.scale( "60%" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " segment ..." << endl;
|
||||
example = model;
|
||||
example.label( "Segment" );
|
||||
example.segment( 0.5, 0.25 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " shade ..." << endl;
|
||||
example = model;
|
||||
example.label( "Shade" );
|
||||
example.shade( 30, 30, false );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " sharpen ..." << endl;
|
||||
example = model;
|
||||
example.label("Sharpen");
|
||||
example.sharpen( 0.0, 1.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " shave ..." << endl;
|
||||
example = model;
|
||||
example.label("Shave");
|
||||
example.shave( Geometry( 10, 10) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " shear ..." << endl;
|
||||
example = model;
|
||||
example.label( "Shear" );
|
||||
example.shear( 45, 45 );
|
||||
example.transparent( "black" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " spread ..." << endl;
|
||||
example = model;
|
||||
example.label( "Spread" );
|
||||
example.spread( 3 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " solarize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Solarize" );
|
||||
example.solarize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " swirl ..." << endl;
|
||||
example = model;
|
||||
example.backgroundColor( "#000000FF" );
|
||||
example.label( "Swirl" );
|
||||
example.swirl( 90 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " threshold ..." << endl;
|
||||
example = model;
|
||||
example.label( "Threshold" );
|
||||
example.threshold( QuantumRange/2.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " threshold random ..." << endl;
|
||||
example = model;
|
||||
example.label( "Random\nThreshold" );
|
||||
example.randomThreshold( Geometry((size_t) (0.3*QuantumRange),
|
||||
(size_t) (0.85*QuantumRange)) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " unsharp mask ..." << endl;
|
||||
example = model;
|
||||
example.label( "Unsharp Mask" );
|
||||
// radius_, sigma_, amount_, threshold_
|
||||
example.unsharpmask( 0.0, 1.0, 1.0, 0.05);
|
||||
images.push_back( example );
|
||||
|
||||
cout << " wave ..." << endl;
|
||||
example = model;
|
||||
example.label( "Wave" );
|
||||
example.matte( true );
|
||||
example.backgroundColor( "#000000FF" );
|
||||
example.wave( 25, 150 );
|
||||
images.push_back( example );
|
||||
|
||||
//
|
||||
// Create image montage.
|
||||
//
|
||||
cout << "Montage images..." << endl;
|
||||
|
||||
for_each( images.begin(), images.end(), strokeColorImage( Color("#600") ) );
|
||||
|
||||
MontageFramed montageOpts;
|
||||
montageOpts.geometry( "130x194+10+5>" );
|
||||
montageOpts.gravity( CenterGravity );
|
||||
montageOpts.borderColor( "green" );
|
||||
montageOpts.borderWidth( 1 );
|
||||
montageOpts.tile( "7x4" );
|
||||
montageOpts.compose( OverCompositeOp );
|
||||
montageOpts.backgroundColor( "#ffffff" );
|
||||
montageOpts.pointSize( 18 );
|
||||
montageOpts.fillColor( "#600" );
|
||||
montageOpts.strokeColor( Color() );
|
||||
montageOpts.compose(OverCompositeOp);
|
||||
montageOpts.fileName( "Magick++ Demo" );
|
||||
montageImages( &montage, images.begin(), images.end(), montageOpts );
|
||||
}
|
||||
|
||||
Image& montage_image = montage.front();
|
||||
{
|
||||
// Create logo image
|
||||
cout << "Adding logo image ..." << endl;
|
||||
Image logo( "logo:" );
|
||||
logo.zoom( "45%" );
|
||||
|
||||
// Composite logo into montage image
|
||||
Geometry placement(0,0,(montage_image.columns()/2)-(logo.columns()/2),0);
|
||||
montage_image.composite( logo, placement, OverCompositeOp );
|
||||
}
|
||||
|
||||
for_each( montage.begin(), montage.end(), depthImage(8) );
|
||||
for_each( montage.begin(), montage.end(), matteImage( false ) );
|
||||
for_each( montage.begin(), montage.end(), compressTypeImage( RLECompression) );
|
||||
|
||||
cout << "Writing image \"demo_out.miff\" ..." << endl;
|
||||
writeImages(montage.begin(),montage.end(),"demo_out_%d.miff");
|
||||
|
||||
// Uncomment following lines to display image to screen
|
||||
// cout << "Display image..." << endl;
|
||||
// montage_image.display();
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2004 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||
#
|
||||
# This file is part of Magick++, the C++ API for ImageMagick and
|
||||
# ImageMagick. Please see the file "COPYING" included with Magick++
|
||||
# for usage and copying restrictions.
|
||||
#
|
||||
subdir=Magick++/demo
|
||||
. ./common.shi
|
||||
echo "1..24"
|
||||
|
||||
SRCDIR=${top_srcdir}/${subdir}/
|
||||
export SRCDIR
|
||||
|
||||
cd ${subdir} || exit 1
|
||||
|
||||
./analyze "$SRCDIR/model.miff" && echo "ok" || echo "not ok"
|
||||
|
||||
for demo in button demo flip gravity piddle shapes
|
||||
do
|
||||
./${demo} && echo "ok" || echo "not ok"
|
||||
done
|
||||
|
||||
for filter in bessel blackman box catrom cubic gaussian hamming hanning hermite lanczos mitchell point quadratic sample scale sinc triangle
|
||||
do
|
||||
./zoom -filter $filter -geometry 600x600 ${SRCDIR}/model.miff zoom_${filter}_out.miff && echo "ok" || echo "not ok"
|
||||
done
|
||||
:
|
@ -1,60 +0,0 @@
|
||||
//
|
||||
// Replace transparency in an image with a solid color using Magick++
|
||||
//
|
||||
// Useful to see how a transparent image looks on a particular
|
||||
// background color, or to create a similar looking effect without
|
||||
// transparency.
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2000
|
||||
//
|
||||
// Usage: detrans color file...
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
using namespace Magick;
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if ( argc < 3 )
|
||||
{
|
||||
cout << "Usage: " << argv[0] << " background_color file..." << endl;
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
{
|
||||
Color color;
|
||||
try {
|
||||
color = Color(argv[1]);
|
||||
}
|
||||
catch ( Exception &error_ )
|
||||
{
|
||||
cout << error_.what() << endl;
|
||||
cout.flush();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char **arg = &argv[2];
|
||||
while ( *arg )
|
||||
{
|
||||
string fname(*arg);
|
||||
try {
|
||||
Image overlay( fname );
|
||||
Image base( overlay.size(), color );
|
||||
base.composite( overlay, 0, 0, OverCompositeOp );
|
||||
base.matte( false );
|
||||
base.write( fname );
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << error_.what() << endl;
|
||||
}
|
||||
++arg;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2003
|
||||
//
|
||||
// Demonstration of unary function-object based operations
|
||||
//
|
||||
// Reads the multi-frame file "smile_anim.miff" and writes a
|
||||
// flipped and morphed version to "flip_out.miff".
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
// Read images into STL list
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "smile_anim.miff" );
|
||||
|
||||
// cout << "Total scenes: " << imageList.size() << endl;
|
||||
|
||||
// Flip images
|
||||
for_each( imageList.begin(), imageList.end(), flipImage() );
|
||||
|
||||
// Create a morphed version, adding three frames between each
|
||||
// existing frame.
|
||||
list<Image> morphed;
|
||||
morphImages( &morphed, imageList.begin(), imageList.end(), 3 );
|
||||
|
||||
// Write out images
|
||||
cout << "Writing image \"flip_out.miff\" ..." << endl;
|
||||
writeImages( morphed.begin(), morphed.end(), "flip_out.miff" );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2000, 2001, 2003
|
||||
//
|
||||
// Demo of text annotation with gravity. Produces an animation showing
|
||||
// the effect of rotated text assize_t with various gravity specifications.
|
||||
//
|
||||
// After running demo program, run 'animate gravity_out.miff' if you
|
||||
// are using X-Windows to see an animated result.
|
||||
//
|
||||
// Concept and algorithms lifted from PerlMagick demo script written
|
||||
// by John Christy.
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
int x = 100;
|
||||
int y = 100;
|
||||
|
||||
list<Image> animation;
|
||||
|
||||
Image base( Geometry(600,600), Color("white") );
|
||||
base.depth(8);
|
||||
base.strokeColor("#600");
|
||||
base.fillColor(Color());
|
||||
base.draw( DrawableLine( 300,100, 300,500 ) );
|
||||
base.draw( DrawableLine( 100,300, 500,300 ) );
|
||||
base.draw( DrawableRectangle( 100,100, 500,500 ) );
|
||||
base.density( Geometry(72,72) );
|
||||
base.strokeColor(Color());
|
||||
base.fillColor("#600");
|
||||
base.fontPointsize( 30 );
|
||||
base.boxColor( "red" );
|
||||
base.animationDelay( 20 );
|
||||
base.compressType( RLECompression );
|
||||
|
||||
for ( int angle = 0; angle < 360; angle += 30 )
|
||||
{
|
||||
cout << "angle " << angle << endl;
|
||||
Image pic = base;
|
||||
pic.annotate( "NorthWest", Geometry(0,0,x,y), NorthWestGravity, angle );
|
||||
pic.annotate( "North", Geometry(0,0,0,y), NorthGravity, angle );
|
||||
pic.annotate( "NorthEast", Geometry(0,0,x,y), NorthEastGravity, angle );
|
||||
pic.annotate( "East", Geometry(0,0,x,0), EastGravity, angle );
|
||||
pic.annotate( "Center", Geometry(0,0,0,0), CenterGravity, angle );
|
||||
pic.annotate( "SouthEast", Geometry(0,0,x,y), SouthEastGravity, angle );
|
||||
pic.annotate( "South", Geometry(0,0,0,y), SouthGravity, angle );
|
||||
pic.annotate( "SouthWest", Geometry(0,0,x,y), SouthWestGravity, angle );
|
||||
pic.annotate( "West", Geometry(0,0,x,0), WestGravity, angle );
|
||||
animation.push_back( pic );
|
||||
}
|
||||
cout << "Writing image \"gravity_out.miff\" ..." << endl;
|
||||
writeImages( animation.begin(), animation.end(), "gravity_out.miff" );
|
||||
// system( "animate gravity_out.miff" );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
@ -1,182 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2002, 2003
|
||||
//
|
||||
// PerlMagick "piddle" demo re-implemented using Magick++ methods.
|
||||
// The PerlMagick "piddle" demo is written by Cristy
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Create a 300x300 white canvas.
|
||||
//
|
||||
Image image( "300x300", "white" );
|
||||
|
||||
// Drawing list
|
||||
std::list<Magick::Drawable> drawList;
|
||||
|
||||
// Start drawing by pushing a drawing context with specified
|
||||
// viewbox size
|
||||
drawList.push_back(DrawablePushGraphicContext());
|
||||
drawList.push_back(DrawableViewbox(0,0,image.columns(),image.rows()));
|
||||
|
||||
//
|
||||
// Draw blue grid
|
||||
//
|
||||
drawList.push_back(DrawableStrokeColor("#ccf"));
|
||||
for ( int i=0; i < 300; i += 10 )
|
||||
{
|
||||
drawList.push_back(DrawableLine(i,0, i,300));
|
||||
drawList.push_back(DrawableLine(0,i, 300,i));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw rounded rectangle.
|
||||
//
|
||||
drawList.push_back(DrawableFillColor("blue"));
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableRoundRectangle(15,15, 70,70, 10,10));
|
||||
|
||||
drawList.push_back(DrawableFillColor("blue"));
|
||||
drawList.push_back(DrawableStrokeColor("maroon"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
drawList.push_back(DrawableRoundRectangle(15,15, 70,70, 10,10));
|
||||
|
||||
//
|
||||
// Draw curve.
|
||||
//
|
||||
{
|
||||
drawList.push_back(DrawableStrokeColor("black"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
drawList.push_back(DrawableFillColor(Color()));
|
||||
|
||||
std::list<Magick::Coordinate> points;
|
||||
points.push_back(Coordinate(20,20));
|
||||
points.push_back(Coordinate(100,50));
|
||||
points.push_back(Coordinate(50,100));
|
||||
points.push_back(Coordinate(160,160));
|
||||
drawList.push_back(DrawableBezier(points));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw line
|
||||
//
|
||||
{
|
||||
const double dash_array[] = {4.0, 3.0, 0.0};
|
||||
drawList.push_back(DrawableDashArray(dash_array));
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableStrokeWidth(1));
|
||||
drawList.push_back(DrawableLine(10,200, 54,182));
|
||||
drawList.push_back(DrawableDashArray((double *) 0));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw arc within a circle.
|
||||
//
|
||||
drawList.push_back(DrawableStrokeColor("black"));
|
||||
drawList.push_back(DrawableFillColor("yellow"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
drawList.push_back(DrawableCircle(160,70, 200,70));
|
||||
|
||||
drawList.push_back(DrawableStrokeColor("black"));
|
||||
drawList.push_back(DrawableFillColor("blue"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
{
|
||||
std::list<VPath> path;
|
||||
path.push_back(PathMovetoAbs(Coordinate(160,70)));
|
||||
path.push_back(PathLinetoVerticalRel(-40));
|
||||
path.push_back(PathArcRel(PathArcArgs(40,40, 0, 0, 0, -40,40)));
|
||||
path.push_back(PathClosePath());
|
||||
drawList.push_back(DrawablePath(path));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw pentogram.
|
||||
//
|
||||
{
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableFillColor("LimeGreen"));
|
||||
drawList.push_back(DrawableStrokeWidth(3));
|
||||
|
||||
std::list<Magick::Coordinate> points;
|
||||
points.push_back(Coordinate(160,120));
|
||||
points.push_back(Coordinate(130,190));
|
||||
points.push_back(Coordinate(210,145));
|
||||
points.push_back(Coordinate(110,145));
|
||||
points.push_back(Coordinate(190,190));
|
||||
points.push_back(Coordinate(160,120));
|
||||
drawList.push_back(DrawablePolygon(points));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw rectangle.
|
||||
//
|
||||
drawList.push_back(DrawableStrokeWidth(5));
|
||||
drawList.push_back(DrawableFillColor(Color())); // No fill
|
||||
drawList.push_back(DrawableStrokeColor("yellow"));
|
||||
drawList.push_back(DrawableLine(200,260, 200,200));
|
||||
drawList.push_back(DrawableLine(200,200, 260,200));
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableLine(260,200, 260,260));
|
||||
drawList.push_back(DrawableStrokeColor("green"));
|
||||
drawList.push_back(DrawableLine(200,260, 260,260));
|
||||
|
||||
//
|
||||
// Draw text.
|
||||
//
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
drawList.push_back(DrawableFont(string(getenv("MAGICK_FONT"))));
|
||||
drawList.push_back(DrawableFillColor("green"));
|
||||
drawList.push_back(DrawableStrokeColor(Color())); // unset color
|
||||
drawList.push_back(DrawablePointSize(24));
|
||||
drawList.push_back(DrawableTranslation(30,140));
|
||||
drawList.push_back(DrawableRotation(45.0));
|
||||
drawList.push_back(DrawableText(0,0,"This is a test!"));
|
||||
|
||||
// Finish drawing by popping back to base context.
|
||||
drawList.push_back(DrawablePopGraphicContext());
|
||||
|
||||
// Draw everything using completed drawing list
|
||||
// image.debug(true);
|
||||
image.draw(drawList);
|
||||
|
||||
// image.write( "piddle.mvg" );
|
||||
|
||||
cout << "Writing image \"piddle_out.miff\" ..." << endl;
|
||||
image.depth( 8 );
|
||||
image.compressType( RLECompression );
|
||||
image.write( "piddle_out.miff" );
|
||||
cout << "Writing MVG metafile \"piddle_out.mvg\" ..." << endl;
|
||||
image.write( "piddle_out.mvg" );
|
||||
|
||||
// cout << "Display image..." << endl;
|
||||
// image.display( );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2002, 2003
|
||||
//
|
||||
// GD/PerlMagick example using Magick++ methods.
|
||||
//
|
||||
// Concept and algorithms lifted from PerlMagick demo script
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Create a 300x300 white canvas.
|
||||
//
|
||||
Image image( "300x300", "white" );
|
||||
|
||||
//
|
||||
// Draw texture-filled polygon
|
||||
//
|
||||
// Polygon list
|
||||
std::list<Coordinate> poly_coord;
|
||||
poly_coord.push_back( Coordinate(30,30) );
|
||||
poly_coord.push_back( Coordinate(100,10) );
|
||||
poly_coord.push_back( Coordinate(190,290) );
|
||||
poly_coord.push_back( Coordinate(30,290) );
|
||||
|
||||
Image texture( srcdir + "tile.miff" );
|
||||
image.penTexture( texture );
|
||||
image.draw( DrawablePolygon( poly_coord ) );
|
||||
texture.isValid( false );
|
||||
image.penTexture( texture ); // Unset texture
|
||||
|
||||
//
|
||||
// Draw filled ellipse with black border, and red fill color
|
||||
//
|
||||
image.strokeColor( "black" );
|
||||
image.fillColor( "red" );
|
||||
image.strokeWidth( 5 );
|
||||
image.draw( DrawableEllipse( 100,100, 50,75, 0,360 ) );
|
||||
image.fillColor( Color() ); // Clear out fill color
|
||||
|
||||
//
|
||||
// Draw ellipse, and polygon, with black stroke, strokeWidth of 5
|
||||
//
|
||||
image.strokeColor( "black" );
|
||||
image.strokeWidth( 5 );
|
||||
list<Drawable> drawlist;
|
||||
|
||||
// Add polygon to list
|
||||
poly_coord.clear();
|
||||
poly_coord.push_back( Coordinate(30,30) );
|
||||
poly_coord.push_back( Coordinate(100,10) );
|
||||
poly_coord.push_back( Coordinate(190,290) );
|
||||
poly_coord.push_back( Coordinate(30,290) );
|
||||
drawlist.push_back( DrawablePolygon( poly_coord ) );
|
||||
image.draw( drawlist );
|
||||
|
||||
//
|
||||
// Floodfill object with blue
|
||||
//
|
||||
image.colorFuzz( 0.5*QuantumRange );
|
||||
image.floodFillColor( "+132+62", "blue" );
|
||||
|
||||
//
|
||||
// Draw text
|
||||
//
|
||||
image.strokeColor(Color());
|
||||
image.fillColor( "red" );
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
image.font(string(getenv("MAGICK_FONT")));
|
||||
image.fontPointsize( 18 );
|
||||
image.annotate( "Hello world!", "+150+20" );
|
||||
|
||||
image.fillColor( "blue" );
|
||||
image.fontPointsize( 14 );
|
||||
image.annotate( "Goodbye cruel world!", "+150+38" );
|
||||
|
||||
image.fillColor( "black" );
|
||||
image.fontPointsize( 14 );
|
||||
image.annotate( "I'm climbing the wall!", "+280+120",
|
||||
NorthWestGravity, 90.0 );
|
||||
//image.display();
|
||||
//
|
||||
// Write image.
|
||||
//
|
||||
|
||||
cout << "Writing image \"shapes_out.miff\" ..." << endl;
|
||||
image.depth( 8 );
|
||||
image.compressType( RLECompression );
|
||||
image.write( "shapes_out.miff" );
|
||||
|
||||
// cout << "Display image..." << endl;
|
||||
// image.display( );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,191 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002, 2003
|
||||
//
|
||||
// Resize image using specified resize algorithm with Magick++ API
|
||||
//
|
||||
// Usage: zoom [-density resolution] [-filter algorithm] [-geometry geometry]
|
||||
// [-resample resolution] input_file output_file
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
using namespace Magick;
|
||||
|
||||
static void Usage ( char **argv )
|
||||
{
|
||||
cout << "Usage: " << argv[0]
|
||||
<< " [-density resolution] [-filter algorithm] [-geometry geometry]"
|
||||
<< " [-resample resolution] input_file output_file" << endl
|
||||
<< " algorithm - bessel blackman box catrom cubic gaussian hamming hanning" << endl
|
||||
<< " hermite lanczos mitchell point quadratic sample scale sinc triangle" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void ParseError (int position, char **argv)
|
||||
{
|
||||
cout << "Argument \"" << argv[position] << "\" at position" << position
|
||||
<< "incorrect" << endl;
|
||||
Usage(argv);
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
if ( argc < 2 )
|
||||
Usage(argv);
|
||||
|
||||
enum ResizeAlgorithm
|
||||
{
|
||||
Zoom,
|
||||
Scale,
|
||||
Sample
|
||||
};
|
||||
|
||||
{
|
||||
Geometry density;
|
||||
Geometry geometry;
|
||||
Geometry resample;
|
||||
Magick::FilterTypes filter(LanczosFilter);
|
||||
ResizeAlgorithm resize_algorithm=Zoom;
|
||||
|
||||
int argv_index=1;
|
||||
while ((argv_index < argc - 2) && (*argv[argv_index] == '-'))
|
||||
{
|
||||
std::string command(argv[argv_index]);
|
||||
if (command.compare("-density") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
try {
|
||||
density=Geometry(argv[argv_index]);
|
||||
}
|
||||
catch( exception &/* error_ */)
|
||||
{
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
else if (command.compare("-filter") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
std::string algorithm(argv[argv_index]);
|
||||
if (algorithm.compare("point") == 0)
|
||||
filter=PointFilter;
|
||||
else if (algorithm.compare("box") == 0)
|
||||
filter=BoxFilter;
|
||||
else if (algorithm.compare("triangle") == 0)
|
||||
filter=TriangleFilter;
|
||||
else if (algorithm.compare("hermite") == 0)
|
||||
filter=HermiteFilter;
|
||||
else if (algorithm.compare("hanning") == 0)
|
||||
filter=HanningFilter;
|
||||
else if (algorithm.compare("hamming") == 0)
|
||||
filter=HammingFilter;
|
||||
else if (algorithm.compare("blackman") == 0)
|
||||
filter=BlackmanFilter;
|
||||
else if (algorithm.compare("gaussian") == 0)
|
||||
filter=GaussianFilter;
|
||||
else if (algorithm.compare("quadratic") == 0)
|
||||
filter=QuadraticFilter;
|
||||
else if (algorithm.compare("cubic") == 0)
|
||||
filter=CubicFilter;
|
||||
else if (algorithm.compare("catrom") == 0)
|
||||
filter=CatromFilter;
|
||||
else if (algorithm.compare("mitchell") == 0)
|
||||
filter=MitchellFilter;
|
||||
else if (algorithm.compare("lanczos") == 0)
|
||||
filter=LanczosFilter;
|
||||
else if (algorithm.compare("bessel") == 0)
|
||||
filter=BesselFilter;
|
||||
else if (algorithm.compare("sinc") == 0)
|
||||
filter=SincFilter;
|
||||
else if (algorithm.compare("sample") == 0)
|
||||
resize_algorithm=Sample;
|
||||
else if (algorithm.compare("scale") == 0)
|
||||
resize_algorithm=Scale;
|
||||
else
|
||||
ParseError(argv_index,argv);
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
else if (command.compare("-geometry") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
try {
|
||||
geometry=Geometry(argv[argv_index]);
|
||||
}
|
||||
catch( exception &/* error_ */)
|
||||
{
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
else if (command.compare("-resample") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
try {
|
||||
resample=Geometry(argv[argv_index]);
|
||||
}
|
||||
catch( exception &/* error_ */)
|
||||
{
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
|
||||
if (argv_index>argc-1)
|
||||
ParseError(argv_index,argv);
|
||||
std::string input_file(argv[argv_index]);
|
||||
argv_index++;
|
||||
if (argv_index>argc)
|
||||
ParseError(argv_index,argv);
|
||||
std::string output_file(argv[argv_index]);
|
||||
|
||||
try {
|
||||
Image image(input_file);
|
||||
if (density.isValid())
|
||||
image.density(density);
|
||||
density=image.density();
|
||||
|
||||
if (resample.isValid())
|
||||
{
|
||||
geometry =
|
||||
Geometry(static_cast<size_t>
|
||||
(image.columns()*((double)resample.width()/density.width())+0.5),
|
||||
static_cast<size_t>
|
||||
(image.rows()*((double)resample.height()/density.height())+0.5));
|
||||
image.density(resample);
|
||||
}
|
||||
switch (resize_algorithm)
|
||||
{
|
||||
case Sample:
|
||||
image.sample(geometry);
|
||||
break;
|
||||
case Scale:
|
||||
image.scale(geometry);
|
||||
break;
|
||||
case Zoom:
|
||||
image.filterType(filter);
|
||||
image.zoom(geometry);
|
||||
break;
|
||||
}
|
||||
image.write(output_file);
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
//
|
||||
// Demonstrate using the 'analyze' process module to compute
|
||||
// image statistics.
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2003, 2004
|
||||
//
|
||||
// Usage: analyze file...
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <list>
|
||||
using namespace std;
|
||||
using namespace Magick;
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if ( argc < 2 )
|
||||
{
|
||||
cout << "Usage: " << argv[0] << " file..." << endl;
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
{
|
||||
std::list<std::string> attributes;
|
||||
|
||||
attributes.push_back("TopLeftColor");
|
||||
attributes.push_back("TopRightColor");
|
||||
attributes.push_back("BottomLeftColor");
|
||||
attributes.push_back("BottomRightColor");
|
||||
attributes.push_back("filter:brightness:mean");
|
||||
attributes.push_back("filter:brightness:standard-deviation");
|
||||
attributes.push_back("filter:brightness:kurtosis");
|
||||
attributes.push_back("filter:brightness:skewness");
|
||||
attributes.push_back("filter:saturation:mean");
|
||||
attributes.push_back("filter:saturation:standard-deviation");
|
||||
attributes.push_back("filter:saturation:kurtosis");
|
||||
attributes.push_back("filter:saturation:skewness");
|
||||
|
||||
char **arg = &argv[1];
|
||||
while ( *arg )
|
||||
{
|
||||
string fname(*arg);
|
||||
try {
|
||||
cout << "File: " << fname << endl;
|
||||
Image image( fname );
|
||||
|
||||
/* Analyze module does not require an argument list */
|
||||
image.process("analyze",0,0);
|
||||
|
||||
list<std::string>::iterator pos = attributes.begin();
|
||||
while(pos != attributes.end())
|
||||
{
|
||||
cout << " " << setw(16) << setfill(' ') << setiosflags(ios::left)
|
||||
<< *pos << " = " << image.attribute(*pos) << endl;
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << error_.what() << endl;
|
||||
}
|
||||
++arg;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
//
|
||||
// Magick++ demo to generate a simple text button
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Options
|
||||
//
|
||||
|
||||
string backGround = "xc:#CCCCCC"; // A solid color
|
||||
|
||||
// Color to use for decorative border
|
||||
Color border = "#D4DCF3";
|
||||
|
||||
// Button size
|
||||
string buttonSize = "120x20";
|
||||
|
||||
// Button background texture
|
||||
string buttonTexture = "granite:";
|
||||
|
||||
// Button text
|
||||
string text = "Button Text";
|
||||
|
||||
// Button text color
|
||||
string textColor = "red";
|
||||
|
||||
// Font point size
|
||||
int fontPointSize = 16;
|
||||
|
||||
//
|
||||
// Magick++ operations
|
||||
//
|
||||
|
||||
Image button;
|
||||
|
||||
// Set button size
|
||||
button.size( buttonSize );
|
||||
|
||||
// Read background image
|
||||
button.read( backGround );
|
||||
|
||||
// Set background to buttonTexture
|
||||
Image backgroundTexture( buttonTexture );
|
||||
button.texture( backgroundTexture );
|
||||
|
||||
// Add some text
|
||||
button.fillColor( textColor );
|
||||
button.fontPointsize( fontPointSize );
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
button.font(string(getenv("MAGICK_FONT")));
|
||||
button.annotate( text, CenterGravity );
|
||||
|
||||
// Add a decorative frame
|
||||
button.borderColor( border );
|
||||
button.frame( "6x6+3+3" );
|
||||
|
||||
button.depth( 8 );
|
||||
|
||||
// Quantize to desired colors
|
||||
// button.quantizeTreeDepth(8);
|
||||
button.quantizeDither(false);
|
||||
button.quantizeColors(64);
|
||||
button.quantize();
|
||||
|
||||
// Save to file
|
||||
cout << "Writing to \"button_out.miff\" ..." << endl;
|
||||
button.compressType( RLECompression );
|
||||
button.write("button_out.miff");
|
||||
|
||||
// Display on screen
|
||||
// button.display();
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,516 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
//
|
||||
// Simple demo program for Magick++
|
||||
//
|
||||
// Concept and algorithms lifted from PerlMagick demo script written
|
||||
// by John Christy.
|
||||
//
|
||||
// Max run-time size 60MB (as compared with 95MB for PerlMagick) under SPARC Solaris
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
list<Image> montage;
|
||||
|
||||
{
|
||||
//
|
||||
// Read model & smile image.
|
||||
//
|
||||
cout << "Read images ..." << endl;
|
||||
|
||||
Image model( srcdir + "model.miff" );
|
||||
model.label( "Magick++" );
|
||||
model.borderColor( "black" );
|
||||
model.backgroundColor( "black" );
|
||||
|
||||
Image smile( srcdir + "smile.miff" );
|
||||
smile.label( "Smile" );
|
||||
smile.borderColor( "black" );
|
||||
|
||||
//
|
||||
// Create image stack.
|
||||
//
|
||||
cout << "Creating thumbnails..." << endl;
|
||||
|
||||
// Construct initial list containing seven copies of a null image
|
||||
Image null;
|
||||
null.size( Geometry(70,70) );
|
||||
null.read( "NULL:black" );
|
||||
list<Image> images( 7, null );
|
||||
|
||||
Image example = model;
|
||||
|
||||
// Each of the following follow the pattern
|
||||
// 1. obtain reference to (own copy of) image
|
||||
// 2. apply label to image
|
||||
// 3. apply operation to image
|
||||
// 4. append image to container
|
||||
|
||||
cout << " add noise ..." << endl;
|
||||
example.label( "Add Noise" );
|
||||
example.addNoise( LaplacianNoise );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " add noise (blue) ..." << endl;
|
||||
example.label( "Add Noise\n(Blue Channel)" );
|
||||
example.addNoiseChannel( BlueChannel, PoissonNoise );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " annotate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Annotate" );
|
||||
example.density( "72x72" );
|
||||
example.fontPointsize( 18 );
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
example.font(string(getenv("MAGICK_FONT")));
|
||||
example.strokeColor( Color() );
|
||||
example.fillColor( "gold" );
|
||||
example.annotate( "Magick++", "+0+20", NorthGravity );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " blur ..." << endl;
|
||||
example = model;
|
||||
example.label( "Blur" );
|
||||
example.blur( 0, 1.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " blur red channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Blur Channel\n(Red Channel)" );
|
||||
example.blurChannel( RedChannel, 0, 3.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " border ..." << endl;
|
||||
example = model;
|
||||
example.label( "Border" );
|
||||
example.borderColor( "gold" );
|
||||
example.border( Geometry(6,6) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Channel\n(Red Channel)" );
|
||||
example.channel( RedChannel );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " charcoal ..." << endl;
|
||||
example = model;
|
||||
example.label( "Charcoal" );
|
||||
example.charcoal( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " composite ..." << endl;
|
||||
example = model;
|
||||
example.label( "Composite" );
|
||||
example.composite( smile, "+35+65", OverCompositeOp);
|
||||
images.push_back( example );
|
||||
|
||||
cout << " contrast ..." << endl;
|
||||
example = model;
|
||||
example.label( "Contrast" );
|
||||
example.contrast( false );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " convolve ..." << endl;
|
||||
example = model;
|
||||
example.label( "Convolve" );
|
||||
{
|
||||
// 3x3 matrix
|
||||
const double kernel[] = { 1, 1, 1, 1, 4, 1, 1, 1, 1 };
|
||||
example.convolve( 3, kernel );
|
||||
}
|
||||
images.push_back( example );
|
||||
|
||||
cout << " crop ..." << endl;
|
||||
example = model;
|
||||
example.label( "Crop" );
|
||||
example.crop( "80x80+25+50" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " despeckle ..." << endl;
|
||||
example = model;
|
||||
example.label( "Despeckle" );
|
||||
example.despeckle( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " draw ..." << endl;
|
||||
example = model;
|
||||
example.label( "Draw" );
|
||||
example.fillColor(Color());
|
||||
example.strokeColor( "gold" );
|
||||
example.strokeWidth( 2 );
|
||||
example.draw( DrawableCircle( 60,90, 60,120 ) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " edge ..." << endl;
|
||||
example = model;
|
||||
example.label( "Detect Edges" );
|
||||
example.edge( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " emboss ..." << endl;
|
||||
example = model;
|
||||
example.label( "Emboss" );
|
||||
example.emboss( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " equalize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Equalize" );
|
||||
example.equalize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " explode ..." << endl;
|
||||
example = model;
|
||||
example.label( "Explode" );
|
||||
example.backgroundColor( "#000000FF" );
|
||||
example.implode( -1 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " flip ..." << endl;
|
||||
example = model;
|
||||
example.label( "Flip" );
|
||||
example.flip( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " flop ..." << endl;
|
||||
example = model;
|
||||
example.label( "Flop" );
|
||||
example.flop();
|
||||
images.push_back( example );
|
||||
|
||||
cout << " frame ..." << endl;
|
||||
example = model;
|
||||
example.label( "Frame" );
|
||||
example.frame( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gamma ..." << endl;
|
||||
example = model;
|
||||
example.label( "Gamma" );
|
||||
example.gamma( 1.6 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gaussian blur ..." << endl;
|
||||
example = model;
|
||||
example.label( "Gaussian Blur" );
|
||||
example.gaussianBlur( 0.0, 1.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gaussian blur channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Gaussian Blur\n(Green Channel)" );
|
||||
example.gaussianBlurChannel( GreenChannel, 0.0, 1.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " gradient ..." << endl;
|
||||
Image gradient;
|
||||
gradient.size( "130x194" );
|
||||
gradient.read( "gradient:#20a0ff-#ffff00" );
|
||||
gradient.label( "Gradient" );
|
||||
images.push_back( gradient );
|
||||
|
||||
cout << " grayscale ..." << endl;
|
||||
example = model;
|
||||
example.label( "Grayscale" );
|
||||
example.quantizeColorSpace( GRAYColorspace );
|
||||
example.quantize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " implode ..." << endl;
|
||||
example = model;
|
||||
example.label( "Implode" );
|
||||
example.implode( 0.5 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " level ..." << endl;
|
||||
example = model;
|
||||
example.label( "Level" );
|
||||
example.level( 0.20*QuantumRange, 0.90*QuantumRange, 1.20 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " level red channel ..." << endl;
|
||||
example = model;
|
||||
example.label( "Level Channel\n(Red Channel)" );
|
||||
example.levelChannel( RedChannel, 0.20*QuantumRange, 0.90*QuantumRange, 1.20 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " median filter ..." << endl;
|
||||
example = model;
|
||||
example.label( "Median Filter" );
|
||||
example.medianFilter( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " modulate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Modulate" );
|
||||
example.modulate( 110, 110, 110 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " monochrome ..." << endl;
|
||||
example = model;
|
||||
example.label( "Monochrome" );
|
||||
example.quantizeColorSpace( GRAYColorspace );
|
||||
example.quantizeColors( 2 );
|
||||
example.quantizeDither( false );
|
||||
example.quantize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " motion blur ..." << endl;
|
||||
example = model;
|
||||
example.label( "Motion Blur" );
|
||||
example.motionBlur( 0.0, 7.0,45 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " negate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Negate" );
|
||||
example.negate( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " normalize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Normalize" );
|
||||
example.normalize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " oil paint ..." << endl;
|
||||
example = model;
|
||||
example.label( "Oil Paint" );
|
||||
example.oilPaint( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither 2x2 ..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(2x2)" );
|
||||
example.randomThreshold( Geometry(2,2) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither 3x3..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(3x3)" );
|
||||
example.randomThreshold( Geometry(3,3) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither 4x4..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(4x4)" );
|
||||
example.randomThreshold( Geometry(4,4) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " ordered dither red 4x4..." << endl;
|
||||
example = model;
|
||||
example.label( "Ordered Dither\n(Red 4x4)" );
|
||||
example.randomThresholdChannel( Geometry(4,4), RedChannel);
|
||||
images.push_back( example );
|
||||
|
||||
cout << " plasma ..." << endl;
|
||||
Image plasma;
|
||||
plasma.size( "130x194" );
|
||||
plasma.read( "plasma:fractal" );
|
||||
plasma.label( "Plasma" );
|
||||
images.push_back( plasma );
|
||||
|
||||
cout << " quantize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Quantize" );
|
||||
example.quantize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " quantum operator ..." << endl;
|
||||
example = model;
|
||||
example.label( "Quantum Operator\nRed * 0.4" );
|
||||
example.quantumOperator( RedChannel,MultiplyEvaluateOperator,0.40 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " raise ..." << endl;
|
||||
example = model;
|
||||
example.label( "Raise" );
|
||||
example.raise( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " reduce noise ..." << endl;
|
||||
example = model;
|
||||
example.label( "Reduce Noise" );
|
||||
example.reduceNoise( 1.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " resize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Resize" );
|
||||
example.zoom( "50%" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " roll ..." << endl;
|
||||
example = model;
|
||||
example.label( "Roll" );
|
||||
example.roll( "+20+10" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " rotate ..." << endl;
|
||||
example = model;
|
||||
example.label( "Rotate" );
|
||||
example.rotate( 45 );
|
||||
example.transparent( "black" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " scale ..." << endl;
|
||||
example = model;
|
||||
example.label( "Scale" );
|
||||
example.scale( "60%" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " segment ..." << endl;
|
||||
example = model;
|
||||
example.label( "Segment" );
|
||||
example.segment( 0.5, 0.25 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " shade ..." << endl;
|
||||
example = model;
|
||||
example.label( "Shade" );
|
||||
example.shade( 30, 30, false );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " sharpen ..." << endl;
|
||||
example = model;
|
||||
example.label("Sharpen");
|
||||
example.sharpen( 0.0, 1.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " shave ..." << endl;
|
||||
example = model;
|
||||
example.label("Shave");
|
||||
example.shave( Geometry( 10, 10) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " shear ..." << endl;
|
||||
example = model;
|
||||
example.label( "Shear" );
|
||||
example.shear( 45, 45 );
|
||||
example.transparent( "black" );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " spread ..." << endl;
|
||||
example = model;
|
||||
example.label( "Spread" );
|
||||
example.spread( 3 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " solarize ..." << endl;
|
||||
example = model;
|
||||
example.label( "Solarize" );
|
||||
example.solarize( );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " swirl ..." << endl;
|
||||
example = model;
|
||||
example.backgroundColor( "#000000FF" );
|
||||
example.label( "Swirl" );
|
||||
example.swirl( 90 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " threshold ..." << endl;
|
||||
example = model;
|
||||
example.label( "Threshold" );
|
||||
example.threshold( QuantumRange/2.0 );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " threshold random ..." << endl;
|
||||
example = model;
|
||||
example.label( "Random\nThreshold" );
|
||||
example.randomThreshold( Geometry((size_t) (0.3*QuantumRange),
|
||||
(size_t) (0.85*QuantumRange)) );
|
||||
images.push_back( example );
|
||||
|
||||
cout << " unsharp mask ..." << endl;
|
||||
example = model;
|
||||
example.label( "Unsharp Mask" );
|
||||
// radius_, sigma_, amount_, threshold_
|
||||
example.unsharpmask( 0.0, 1.0, 1.0, 0.05);
|
||||
images.push_back( example );
|
||||
|
||||
cout << " wave ..." << endl;
|
||||
example = model;
|
||||
example.label( "Wave" );
|
||||
example.matte( true );
|
||||
example.backgroundColor( "#000000FF" );
|
||||
example.wave( 25, 150 );
|
||||
images.push_back( example );
|
||||
|
||||
//
|
||||
// Create image montage.
|
||||
//
|
||||
cout << "Montage images..." << endl;
|
||||
|
||||
for_each( images.begin(), images.end(), strokeColorImage( Color("#600") ) );
|
||||
|
||||
MontageFramed montageOpts;
|
||||
montageOpts.geometry( "130x194+10+5>" );
|
||||
montageOpts.gravity( CenterGravity );
|
||||
montageOpts.borderColor( "green" );
|
||||
montageOpts.borderWidth( 1 );
|
||||
montageOpts.tile( "7x4" );
|
||||
montageOpts.compose( OverCompositeOp );
|
||||
montageOpts.backgroundColor( "#ffffff" );
|
||||
montageOpts.pointSize( 18 );
|
||||
montageOpts.fillColor( "#600" );
|
||||
montageOpts.strokeColor( Color() );
|
||||
montageOpts.compose(OverCompositeOp);
|
||||
montageOpts.fileName( "Magick++ Demo" );
|
||||
montageImages( &montage, images.begin(), images.end(), montageOpts );
|
||||
}
|
||||
|
||||
Image& montage_image = montage.front();
|
||||
{
|
||||
// Create logo image
|
||||
cout << "Adding logo image ..." << endl;
|
||||
Image logo( "logo:" );
|
||||
logo.zoom( "45%" );
|
||||
|
||||
// Composite logo into montage image
|
||||
Geometry placement(0,0,(montage_image.columns()/2)-(logo.columns()/2),0);
|
||||
montage_image.composite( logo, placement, OverCompositeOp );
|
||||
}
|
||||
|
||||
for_each( montage.begin(), montage.end(), depthImage(8) );
|
||||
for_each( montage.begin(), montage.end(), matteImage( false ) );
|
||||
for_each( montage.begin(), montage.end(), compressTypeImage( RLECompression) );
|
||||
|
||||
cout << "Writing image \"demo_out.miff\" ..." << endl;
|
||||
writeImages(montage.begin(),montage.end(),"demo_out_%d.miff");
|
||||
|
||||
// Uncomment following lines to display image to screen
|
||||
// cout << "Display image..." << endl;
|
||||
// montage_image.display();
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
//
|
||||
// Replace transparency in an image with a solid color using Magick++
|
||||
//
|
||||
// Useful to see how a transparent image looks on a particular
|
||||
// background color, or to create a similar looking effect without
|
||||
// transparency.
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2000
|
||||
//
|
||||
// Usage: detrans color file...
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
using namespace Magick;
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if ( argc < 3 )
|
||||
{
|
||||
cout << "Usage: " << argv[0] << " background_color file..." << endl;
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
{
|
||||
Color color;
|
||||
try {
|
||||
color = Color(argv[1]);
|
||||
}
|
||||
catch ( Exception &error_ )
|
||||
{
|
||||
cout << error_.what() << endl;
|
||||
cout.flush();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char **arg = &argv[2];
|
||||
while ( *arg )
|
||||
{
|
||||
string fname(*arg);
|
||||
try {
|
||||
Image overlay( fname );
|
||||
Image base( overlay.size(), color );
|
||||
base.composite( overlay, 0, 0, OverCompositeOp );
|
||||
base.matte( false );
|
||||
base.write( fname );
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << error_.what() << endl;
|
||||
}
|
||||
++arg;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2003
|
||||
//
|
||||
// Demonstration of unary function-object based operations
|
||||
//
|
||||
// Reads the multi-frame file "smile_anim.miff" and writes a
|
||||
// flipped and morphed version to "flip_out.miff".
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
// Read images into STL list
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "smile_anim.miff" );
|
||||
|
||||
// cout << "Total scenes: " << imageList.size() << endl;
|
||||
|
||||
// Flip images
|
||||
for_each( imageList.begin(), imageList.end(), flipImage() );
|
||||
|
||||
// Create a morphed version, adding three frames between each
|
||||
// existing frame.
|
||||
list<Image> morphed;
|
||||
morphImages( &morphed, imageList.begin(), imageList.end(), 3 );
|
||||
|
||||
// Write out images
|
||||
cout << "Writing image \"flip_out.miff\" ..." << endl;
|
||||
writeImages( morphed.begin(), morphed.end(), "flip_out.miff" );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2000, 2001, 2003
|
||||
//
|
||||
// Demo of text annotation with gravity. Produces an animation showing
|
||||
// the effect of rotated text assize_t with various gravity specifications.
|
||||
//
|
||||
// After running demo program, run 'animate gravity_out.miff' if you
|
||||
// are using X-Windows to see an animated result.
|
||||
//
|
||||
// Concept and algorithms lifted from PerlMagick demo script written
|
||||
// by John Christy.
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
int x = 100;
|
||||
int y = 100;
|
||||
|
||||
list<Image> animation;
|
||||
|
||||
Image base( Geometry(600,600), Color("white") );
|
||||
base.depth(8);
|
||||
base.strokeColor("#600");
|
||||
base.fillColor(Color());
|
||||
base.draw( DrawableLine( 300,100, 300,500 ) );
|
||||
base.draw( DrawableLine( 100,300, 500,300 ) );
|
||||
base.draw( DrawableRectangle( 100,100, 500,500 ) );
|
||||
base.density( Geometry(72,72) );
|
||||
base.strokeColor(Color());
|
||||
base.fillColor("#600");
|
||||
base.fontPointsize( 30 );
|
||||
base.boxColor( "red" );
|
||||
base.animationDelay( 20 );
|
||||
base.compressType( RLECompression );
|
||||
|
||||
for ( int angle = 0; angle < 360; angle += 30 )
|
||||
{
|
||||
cout << "angle " << angle << endl;
|
||||
Image pic = base;
|
||||
pic.annotate( "NorthWest", Geometry(0,0,x,y), NorthWestGravity, angle );
|
||||
pic.annotate( "North", Geometry(0,0,0,y), NorthGravity, angle );
|
||||
pic.annotate( "NorthEast", Geometry(0,0,x,y), NorthEastGravity, angle );
|
||||
pic.annotate( "East", Geometry(0,0,x,0), EastGravity, angle );
|
||||
pic.annotate( "Center", Geometry(0,0,0,0), CenterGravity, angle );
|
||||
pic.annotate( "SouthEast", Geometry(0,0,x,y), SouthEastGravity, angle );
|
||||
pic.annotate( "South", Geometry(0,0,0,y), SouthGravity, angle );
|
||||
pic.annotate( "SouthWest", Geometry(0,0,x,y), SouthWestGravity, angle );
|
||||
pic.annotate( "West", Geometry(0,0,x,0), WestGravity, angle );
|
||||
animation.push_back( pic );
|
||||
}
|
||||
cout << "Writing image \"gravity_out.miff\" ..." << endl;
|
||||
writeImages( animation.begin(), animation.end(), "gravity_out.miff" );
|
||||
// system( "animate gravity_out.miff" );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
@ -1,182 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2002, 2003
|
||||
//
|
||||
// PerlMagick "piddle" demo re-implemented using Magick++ methods.
|
||||
// The PerlMagick "piddle" demo is written by Cristy
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Create a 300x300 white canvas.
|
||||
//
|
||||
Image image( "300x300", "white" );
|
||||
|
||||
// Drawing list
|
||||
std::list<Magick::Drawable> drawList;
|
||||
|
||||
// Start drawing by pushing a drawing context with specified
|
||||
// viewbox size
|
||||
drawList.push_back(DrawablePushGraphicContext());
|
||||
drawList.push_back(DrawableViewbox(0,0,image.columns(),image.rows()));
|
||||
|
||||
//
|
||||
// Draw blue grid
|
||||
//
|
||||
drawList.push_back(DrawableStrokeColor("#ccf"));
|
||||
for ( int i=0; i < 300; i += 10 )
|
||||
{
|
||||
drawList.push_back(DrawableLine(i,0, i,300));
|
||||
drawList.push_back(DrawableLine(0,i, 300,i));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw rounded rectangle.
|
||||
//
|
||||
drawList.push_back(DrawableFillColor("blue"));
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableRoundRectangle(15,15, 70,70, 10,10));
|
||||
|
||||
drawList.push_back(DrawableFillColor("blue"));
|
||||
drawList.push_back(DrawableStrokeColor("maroon"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
drawList.push_back(DrawableRoundRectangle(15,15, 70,70, 10,10));
|
||||
|
||||
//
|
||||
// Draw curve.
|
||||
//
|
||||
{
|
||||
drawList.push_back(DrawableStrokeColor("black"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
drawList.push_back(DrawableFillColor(Color()));
|
||||
|
||||
std::list<Magick::Coordinate> points;
|
||||
points.push_back(Coordinate(20,20));
|
||||
points.push_back(Coordinate(100,50));
|
||||
points.push_back(Coordinate(50,100));
|
||||
points.push_back(Coordinate(160,160));
|
||||
drawList.push_back(DrawableBezier(points));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw line
|
||||
//
|
||||
{
|
||||
const double dash_array[] = {4.0, 3.0, 0.0};
|
||||
drawList.push_back(DrawableDashArray(dash_array));
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableStrokeWidth(1));
|
||||
drawList.push_back(DrawableLine(10,200, 54,182));
|
||||
drawList.push_back(DrawableDashArray((double *) 0));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw arc within a circle.
|
||||
//
|
||||
drawList.push_back(DrawableStrokeColor("black"));
|
||||
drawList.push_back(DrawableFillColor("yellow"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
drawList.push_back(DrawableCircle(160,70, 200,70));
|
||||
|
||||
drawList.push_back(DrawableStrokeColor("black"));
|
||||
drawList.push_back(DrawableFillColor("blue"));
|
||||
drawList.push_back(DrawableStrokeWidth(4));
|
||||
{
|
||||
std::list<VPath> path;
|
||||
path.push_back(PathMovetoAbs(Coordinate(160,70)));
|
||||
path.push_back(PathLinetoVerticalRel(-40));
|
||||
path.push_back(PathArcRel(PathArcArgs(40,40, 0, 0, 0, -40,40)));
|
||||
path.push_back(PathClosePath());
|
||||
drawList.push_back(DrawablePath(path));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw pentogram.
|
||||
//
|
||||
{
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableFillColor("LimeGreen"));
|
||||
drawList.push_back(DrawableStrokeWidth(3));
|
||||
|
||||
std::list<Magick::Coordinate> points;
|
||||
points.push_back(Coordinate(160,120));
|
||||
points.push_back(Coordinate(130,190));
|
||||
points.push_back(Coordinate(210,145));
|
||||
points.push_back(Coordinate(110,145));
|
||||
points.push_back(Coordinate(190,190));
|
||||
points.push_back(Coordinate(160,120));
|
||||
drawList.push_back(DrawablePolygon(points));
|
||||
}
|
||||
|
||||
//
|
||||
// Draw rectangle.
|
||||
//
|
||||
drawList.push_back(DrawableStrokeWidth(5));
|
||||
drawList.push_back(DrawableFillColor(Color())); // No fill
|
||||
drawList.push_back(DrawableStrokeColor("yellow"));
|
||||
drawList.push_back(DrawableLine(200,260, 200,200));
|
||||
drawList.push_back(DrawableLine(200,200, 260,200));
|
||||
drawList.push_back(DrawableStrokeColor("red"));
|
||||
drawList.push_back(DrawableLine(260,200, 260,260));
|
||||
drawList.push_back(DrawableStrokeColor("green"));
|
||||
drawList.push_back(DrawableLine(200,260, 260,260));
|
||||
|
||||
//
|
||||
// Draw text.
|
||||
//
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
drawList.push_back(DrawableFont(string(getenv("MAGICK_FONT"))));
|
||||
drawList.push_back(DrawableFillColor("green"));
|
||||
drawList.push_back(DrawableStrokeColor(Color())); // unset color
|
||||
drawList.push_back(DrawablePointSize(24));
|
||||
drawList.push_back(DrawableTranslation(30,140));
|
||||
drawList.push_back(DrawableRotation(45.0));
|
||||
drawList.push_back(DrawableText(0,0,"This is a test!"));
|
||||
|
||||
// Finish drawing by popping back to base context.
|
||||
drawList.push_back(DrawablePopGraphicContext());
|
||||
|
||||
// Draw everything using completed drawing list
|
||||
// image.debug(true);
|
||||
image.draw(drawList);
|
||||
|
||||
// image.write( "piddle.mvg" );
|
||||
|
||||
cout << "Writing image \"piddle_out.miff\" ..." << endl;
|
||||
image.depth( 8 );
|
||||
image.compressType( RLECompression );
|
||||
image.write( "piddle_out.miff" );
|
||||
cout << "Writing MVG metafile \"piddle_out.mvg\" ..." << endl;
|
||||
image.write( "piddle_out.mvg" );
|
||||
|
||||
// cout << "Display image..." << endl;
|
||||
// image.display( );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2002, 2003
|
||||
//
|
||||
// GD/PerlMagick example using Magick++ methods.
|
||||
//
|
||||
// Concept and algorithms lifted from PerlMagick demo script
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Create a 300x300 white canvas.
|
||||
//
|
||||
Image image( "300x300", "white" );
|
||||
|
||||
//
|
||||
// Draw texture-filled polygon
|
||||
//
|
||||
// Polygon list
|
||||
std::list<Coordinate> poly_coord;
|
||||
poly_coord.push_back( Coordinate(30,30) );
|
||||
poly_coord.push_back( Coordinate(100,10) );
|
||||
poly_coord.push_back( Coordinate(190,290) );
|
||||
poly_coord.push_back( Coordinate(30,290) );
|
||||
|
||||
Image texture( srcdir + "tile.miff" );
|
||||
image.penTexture( texture );
|
||||
image.draw( DrawablePolygon( poly_coord ) );
|
||||
texture.isValid( false );
|
||||
image.penTexture( texture ); // Unset texture
|
||||
|
||||
//
|
||||
// Draw filled ellipse with black border, and red fill color
|
||||
//
|
||||
image.strokeColor( "black" );
|
||||
image.fillColor( "red" );
|
||||
image.strokeWidth( 5 );
|
||||
image.draw( DrawableEllipse( 100,100, 50,75, 0,360 ) );
|
||||
image.fillColor( Color() ); // Clear out fill color
|
||||
|
||||
//
|
||||
// Draw ellipse, and polygon, with black stroke, strokeWidth of 5
|
||||
//
|
||||
image.strokeColor( "black" );
|
||||
image.strokeWidth( 5 );
|
||||
list<Drawable> drawlist;
|
||||
|
||||
// Add polygon to list
|
||||
poly_coord.clear();
|
||||
poly_coord.push_back( Coordinate(30,30) );
|
||||
poly_coord.push_back( Coordinate(100,10) );
|
||||
poly_coord.push_back( Coordinate(190,290) );
|
||||
poly_coord.push_back( Coordinate(30,290) );
|
||||
drawlist.push_back( DrawablePolygon( poly_coord ) );
|
||||
image.draw( drawlist );
|
||||
|
||||
//
|
||||
// Floodfill object with blue
|
||||
//
|
||||
image.colorFuzz( 0.5*QuantumRange );
|
||||
image.floodFillColor( "+132+62", "blue" );
|
||||
|
||||
//
|
||||
// Draw text
|
||||
//
|
||||
image.strokeColor(Color());
|
||||
image.fillColor( "red" );
|
||||
if (getenv("MAGICK_FONT") != 0)
|
||||
image.font(string(getenv("MAGICK_FONT")));
|
||||
image.fontPointsize( 18 );
|
||||
image.annotate( "Hello world!", "+150+20" );
|
||||
|
||||
image.fillColor( "blue" );
|
||||
image.fontPointsize( 14 );
|
||||
image.annotate( "Goodbye cruel world!", "+150+38" );
|
||||
|
||||
image.fillColor( "black" );
|
||||
image.fontPointsize( 14 );
|
||||
image.annotate( "I'm climbing the wall!", "+280+120",
|
||||
NorthWestGravity, 90.0 );
|
||||
//image.display();
|
||||
//
|
||||
// Write image.
|
||||
//
|
||||
|
||||
cout << "Writing image \"shapes_out.miff\" ..." << endl;
|
||||
image.depth( 8 );
|
||||
image.compressType( RLECompression );
|
||||
image.write( "shapes_out.miff" );
|
||||
|
||||
// cout << "Display image..." << endl;
|
||||
// image.display( );
|
||||
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,191 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002, 2003
|
||||
//
|
||||
// Resize image using specified resize algorithm with Magick++ API
|
||||
//
|
||||
// Usage: zoom [-density resolution] [-filter algorithm] [-geometry geometry]
|
||||
// [-resample resolution] input_file output_file
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
using namespace Magick;
|
||||
|
||||
static void Usage ( char **argv )
|
||||
{
|
||||
cout << "Usage: " << argv[0]
|
||||
<< " [-density resolution] [-filter algorithm] [-geometry geometry]"
|
||||
<< " [-resample resolution] input_file output_file" << endl
|
||||
<< " algorithm - bessel blackman box catrom cubic gaussian hamming hanning" << endl
|
||||
<< " hermite lanczos mitchell point quadratic sample scale sinc triangle" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void ParseError (int position, char **argv)
|
||||
{
|
||||
cout << "Argument \"" << argv[position] << "\" at position" << position
|
||||
<< "incorrect" << endl;
|
||||
Usage(argv);
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
if ( argc < 2 )
|
||||
Usage(argv);
|
||||
|
||||
enum ResizeAlgorithm
|
||||
{
|
||||
Zoom,
|
||||
Scale,
|
||||
Sample
|
||||
};
|
||||
|
||||
{
|
||||
Geometry density;
|
||||
Geometry geometry;
|
||||
Geometry resample;
|
||||
Magick::FilterTypes filter(LanczosFilter);
|
||||
ResizeAlgorithm resize_algorithm=Zoom;
|
||||
|
||||
int argv_index=1;
|
||||
while ((argv_index < argc - 2) && (*argv[argv_index] == '-'))
|
||||
{
|
||||
std::string command(argv[argv_index]);
|
||||
if (command.compare("-density") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
try {
|
||||
density=Geometry(argv[argv_index]);
|
||||
}
|
||||
catch( exception &/* error_ */)
|
||||
{
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
else if (command.compare("-filter") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
std::string algorithm(argv[argv_index]);
|
||||
if (algorithm.compare("point") == 0)
|
||||
filter=PointFilter;
|
||||
else if (algorithm.compare("box") == 0)
|
||||
filter=BoxFilter;
|
||||
else if (algorithm.compare("triangle") == 0)
|
||||
filter=TriangleFilter;
|
||||
else if (algorithm.compare("hermite") == 0)
|
||||
filter=HermiteFilter;
|
||||
else if (algorithm.compare("hanning") == 0)
|
||||
filter=HanningFilter;
|
||||
else if (algorithm.compare("hamming") == 0)
|
||||
filter=HammingFilter;
|
||||
else if (algorithm.compare("blackman") == 0)
|
||||
filter=BlackmanFilter;
|
||||
else if (algorithm.compare("gaussian") == 0)
|
||||
filter=GaussianFilter;
|
||||
else if (algorithm.compare("quadratic") == 0)
|
||||
filter=QuadraticFilter;
|
||||
else if (algorithm.compare("cubic") == 0)
|
||||
filter=CubicFilter;
|
||||
else if (algorithm.compare("catrom") == 0)
|
||||
filter=CatromFilter;
|
||||
else if (algorithm.compare("mitchell") == 0)
|
||||
filter=MitchellFilter;
|
||||
else if (algorithm.compare("lanczos") == 0)
|
||||
filter=LanczosFilter;
|
||||
else if (algorithm.compare("bessel") == 0)
|
||||
filter=BesselFilter;
|
||||
else if (algorithm.compare("sinc") == 0)
|
||||
filter=SincFilter;
|
||||
else if (algorithm.compare("sample") == 0)
|
||||
resize_algorithm=Sample;
|
||||
else if (algorithm.compare("scale") == 0)
|
||||
resize_algorithm=Scale;
|
||||
else
|
||||
ParseError(argv_index,argv);
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
else if (command.compare("-geometry") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
try {
|
||||
geometry=Geometry(argv[argv_index]);
|
||||
}
|
||||
catch( exception &/* error_ */)
|
||||
{
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
else if (command.compare("-resample") == 0)
|
||||
{
|
||||
argv_index++;
|
||||
try {
|
||||
resample=Geometry(argv[argv_index]);
|
||||
}
|
||||
catch( exception &/* error_ */)
|
||||
{
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
argv_index++;
|
||||
continue;
|
||||
}
|
||||
ParseError(argv_index,argv);
|
||||
}
|
||||
|
||||
if (argv_index>argc-1)
|
||||
ParseError(argv_index,argv);
|
||||
std::string input_file(argv[argv_index]);
|
||||
argv_index++;
|
||||
if (argv_index>argc)
|
||||
ParseError(argv_index,argv);
|
||||
std::string output_file(argv[argv_index]);
|
||||
|
||||
try {
|
||||
Image image(input_file);
|
||||
if (density.isValid())
|
||||
image.density(density);
|
||||
density=image.density();
|
||||
|
||||
if (resample.isValid())
|
||||
{
|
||||
geometry =
|
||||
Geometry(static_cast<size_t>
|
||||
(image.columns()*((double)resample.width()/density.width())+0.5),
|
||||
static_cast<size_t>
|
||||
(image.rows()*((double)resample.height()/density.height())+0.5));
|
||||
image.density(resample);
|
||||
}
|
||||
switch (resize_algorithm)
|
||||
{
|
||||
case Sample:
|
||||
image.sample(geometry);
|
||||
break;
|
||||
case Scale:
|
||||
image.scale(geometry);
|
||||
break;
|
||||
case Zoom:
|
||||
image.filterType(filter);
|
||||
image.zoom(geometry);
|
||||
break;
|
||||
}
|
||||
image.write(output_file);
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,170 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2004
|
||||
// Copyright Dirk Lemstra 2015
|
||||
//
|
||||
// Implementation of Blob
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/Blob.h"
|
||||
#include "Magick++/BlobRef.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
Magick::Blob::Blob(void)
|
||||
: _blobRef(new Magick::BlobRef(0,0))
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Blob::Blob(const void* data_,const size_t length_)
|
||||
: _blobRef(new Magick::BlobRef(data_,length_))
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Blob::Blob(const Magick::Blob& blob_)
|
||||
: _blobRef(blob_._blobRef)
|
||||
{
|
||||
// Increase reference count
|
||||
Lock lock(&_blobRef->_mutexLock);
|
||||
++_blobRef->_refCount;
|
||||
}
|
||||
|
||||
Magick::Blob::~Blob ()
|
||||
{
|
||||
bool doDelete=false;
|
||||
{
|
||||
Lock lock(&_blobRef->_mutexLock);
|
||||
if (--_blobRef->_refCount == 0)
|
||||
doDelete=true;
|
||||
}
|
||||
|
||||
if (doDelete)
|
||||
{
|
||||
// Delete old blob reference with associated data
|
||||
delete _blobRef;
|
||||
}
|
||||
_blobRef=0;
|
||||
}
|
||||
|
||||
Magick::Blob& Magick::Blob::operator=(const Magick::Blob& blob_)
|
||||
{
|
||||
bool
|
||||
doDelete;
|
||||
|
||||
if (this != &blob_)
|
||||
{
|
||||
{
|
||||
Lock lock(&blob_._blobRef->_mutexLock);
|
||||
++blob_._blobRef->_refCount;
|
||||
}
|
||||
doDelete=false;
|
||||
{
|
||||
Lock lock(&_blobRef->_mutexLock);
|
||||
if (--_blobRef->_refCount == 0)
|
||||
doDelete=true;
|
||||
}
|
||||
if (doDelete)
|
||||
{
|
||||
delete _blobRef;
|
||||
}
|
||||
_blobRef=blob_._blobRef;
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
void Magick::Blob::base64(const std::string base64_)
|
||||
{
|
||||
size_t
|
||||
length;
|
||||
|
||||
unsigned char
|
||||
*decoded;
|
||||
|
||||
decoded=Base64Decode(base64_.c_str(),&length);
|
||||
if (decoded)
|
||||
updateNoCopy(static_cast<void*>(decoded),length,
|
||||
Magick::Blob::MallocAllocator);
|
||||
}
|
||||
|
||||
std::string Magick::Blob::base64(void)
|
||||
{
|
||||
char
|
||||
*encoded;
|
||||
|
||||
size_t
|
||||
encoded_length;
|
||||
|
||||
std::string
|
||||
result;
|
||||
|
||||
encoded_length=0;
|
||||
encoded=Base64Encode(static_cast<const unsigned char*>(data()),length(),
|
||||
&encoded_length);
|
||||
|
||||
if (encoded)
|
||||
{
|
||||
result=std::string(encoded,encoded_length);
|
||||
encoded=(char *) RelinquishMagickMemory(encoded);
|
||||
return result;
|
||||
}
|
||||
|
||||
return(std::string());
|
||||
}
|
||||
|
||||
const void* Magick::Blob::data(void) const
|
||||
{
|
||||
return(_blobRef->_data);
|
||||
}
|
||||
|
||||
size_t Magick::Blob::length(void) const
|
||||
{
|
||||
return(_blobRef->_length);
|
||||
}
|
||||
|
||||
void Magick::Blob::update(const void* data_,const size_t length_)
|
||||
{
|
||||
bool
|
||||
doDelete;
|
||||
|
||||
doDelete=false;
|
||||
{
|
||||
Lock lock( &_blobRef->_mutexLock );
|
||||
if (--_blobRef->_refCount == 0)
|
||||
doDelete=true;
|
||||
}
|
||||
if (doDelete)
|
||||
{
|
||||
// Delete old blob reference with associated data
|
||||
delete _blobRef;
|
||||
}
|
||||
|
||||
_blobRef=new Magick::BlobRef(data_,length_);
|
||||
}
|
||||
|
||||
void Magick::Blob::updateNoCopy(void* data_,const size_t length_,
|
||||
Magick::Blob::Allocator allocator_)
|
||||
{
|
||||
bool
|
||||
doDelete;
|
||||
|
||||
doDelete=false;
|
||||
{
|
||||
Lock lock(&_blobRef->_mutexLock);
|
||||
if (--_blobRef->_refCount == 0)
|
||||
doDelete=true;
|
||||
}
|
||||
|
||||
if (doDelete)
|
||||
{
|
||||
// Delete old blob reference with associated data
|
||||
delete _blobRef;
|
||||
}
|
||||
_blobRef=new Magick::BlobRef(0,0);
|
||||
_blobRef->_data=data_;
|
||||
_blobRef->_length=length_;
|
||||
_blobRef->_allocator=allocator_;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2004
|
||||
// Copyright Dirk Lemstra 2015
|
||||
//
|
||||
// Implementation of Blob
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/Thread.h"
|
||||
#include "Magick++/BlobRef.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
Magick::BlobRef::BlobRef(const void* data_,const size_t length_)
|
||||
: _data(0),
|
||||
_length(length_),
|
||||
_allocator(Magick::Blob::NewAllocator),
|
||||
_refCount(1),
|
||||
_mutexLock()
|
||||
{
|
||||
if (data_)
|
||||
{
|
||||
_data=new unsigned char[length_];
|
||||
memcpy(_data,data_,length_);
|
||||
}
|
||||
}
|
||||
|
||||
// Destructor (actually destroys data)
|
||||
Magick::BlobRef::~BlobRef(void)
|
||||
{
|
||||
if (_allocator == Magick::Blob::NewAllocator)
|
||||
{
|
||||
delete[] static_cast<unsigned char*>(_data);
|
||||
_data=0;
|
||||
}
|
||||
else if (_allocator == Magick::Blob::MallocAllocator)
|
||||
{
|
||||
_data=(void *) RelinquishMagickMemory(_data);
|
||||
}
|
||||
}
|
@ -1,187 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Dirk Lemstra 2014-2015
|
||||
//
|
||||
// Implementation of channel moments.
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/ChannelMoments.h"
|
||||
#include "Magick++/Exception.h"
|
||||
#include "Magick++/Image.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Magick::ChannelMoments::ChannelMoments(void)
|
||||
: _huInvariants(8),
|
||||
_channel(UndefinedChannel),
|
||||
_centroidX(0.0),
|
||||
_centroidY(0.0),
|
||||
_ellipseAxisX(0.0),
|
||||
_ellipseAxisY(0.0),
|
||||
_ellipseAngle(0.0),
|
||||
_ellipseEccentricity(0.0),
|
||||
_ellipseIntensity(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ChannelMoments::ChannelMoments(const ChannelMoments &channelMoments_)
|
||||
: _huInvariants(channelMoments_._huInvariants),
|
||||
_channel(channelMoments_._channel),
|
||||
_centroidX(channelMoments_._centroidX),
|
||||
_centroidY(channelMoments_._centroidY),
|
||||
_ellipseAxisX(channelMoments_._ellipseAxisX),
|
||||
_ellipseAxisY(channelMoments_._ellipseAxisY),
|
||||
_ellipseAngle(channelMoments_._ellipseAngle),
|
||||
_ellipseEccentricity(channelMoments_._ellipseEccentricity),
|
||||
_ellipseIntensity(channelMoments_._ellipseIntensity)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ChannelMoments::~ChannelMoments(void)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ChannelMoments::ChannelMoments(const ChannelType channel_,
|
||||
const MagickCore::ChannelMoments *channelMoments_)
|
||||
: _huInvariants(),
|
||||
_channel(channel_),
|
||||
_centroidX(channelMoments_->centroid.x),
|
||||
_centroidY(channelMoments_->centroid.y),
|
||||
_ellipseAxisX(channelMoments_->ellipse_axis.x),
|
||||
_ellipseAxisY(channelMoments_->ellipse_axis.y),
|
||||
_ellipseAngle(channelMoments_->ellipse_angle),
|
||||
_ellipseEccentricity(channelMoments_->ellipse_eccentricity),
|
||||
_ellipseIntensity(channelMoments_->ellipse_intensity)
|
||||
{
|
||||
size_t
|
||||
i;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
_huInvariants.push_back(channelMoments_->I[i]);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::centroidX(void) const
|
||||
{
|
||||
return(_centroidX);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::centroidY(void) const
|
||||
{
|
||||
return(_centroidY);
|
||||
}
|
||||
|
||||
Magick::ChannelType Magick::ChannelMoments::channel(void) const
|
||||
{
|
||||
return(_channel);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::ellipseAxisX(void) const
|
||||
{
|
||||
return(_ellipseAxisX);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::ellipseAxisY(void) const
|
||||
{
|
||||
return(_ellipseAxisY);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::ellipseAngle(void) const
|
||||
{
|
||||
return(_ellipseAngle);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::ellipseEccentricity(void) const
|
||||
{
|
||||
return(_ellipseEccentricity);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::ellipseIntensity(void) const
|
||||
{
|
||||
return(_ellipseIntensity);
|
||||
}
|
||||
|
||||
double Magick::ChannelMoments::huInvariants(const size_t index_) const
|
||||
{
|
||||
if (index_ > 7)
|
||||
throw ErrorOption("Valid range for index is 0-7");
|
||||
|
||||
return(_huInvariants.at(index_));
|
||||
}
|
||||
|
||||
Magick::ImageMoments::ImageMoments(void)
|
||||
: _channels()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ImageMoments::ImageMoments(const ImageMoments &imageMoments_)
|
||||
: _channels(imageMoments_._channels)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ImageMoments::~ImageMoments(void)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ChannelMoments Magick::ImageMoments::channel(
|
||||
const ChannelType channel_) const
|
||||
{
|
||||
for (std::vector<ChannelMoments>::const_iterator it = _channels.begin();
|
||||
it != _channels.end(); ++it)
|
||||
{
|
||||
if (it->channel() == channel_)
|
||||
return(*it);
|
||||
}
|
||||
return(ChannelMoments());
|
||||
}
|
||||
|
||||
Magick::ImageMoments::ImageMoments(const Image &image_)
|
||||
: _channels()
|
||||
{
|
||||
MagickCore::ChannelMoments*
|
||||
channel_moments;
|
||||
|
||||
GetPPException;
|
||||
channel_moments=GetImageChannelMoments(image_.constImage(),exceptionInfo);
|
||||
if (channel_moments != (MagickCore::ChannelMoments *) NULL)
|
||||
{
|
||||
switch(image_.constImage()->colorspace)
|
||||
{
|
||||
case RGBColorspace:
|
||||
default:
|
||||
_channels.push_back(Magick::ChannelMoments(RedChannel,
|
||||
&channel_moments[RedChannel]));
|
||||
_channels.push_back(Magick::ChannelMoments(GreenChannel,
|
||||
&channel_moments[GreenChannel]));
|
||||
_channels.push_back(Magick::ChannelMoments(BlueChannel,
|
||||
&channel_moments[BlueChannel]));
|
||||
break;
|
||||
case CMYKColorspace:
|
||||
_channels.push_back(Magick::ChannelMoments(CyanChannel,
|
||||
&channel_moments[CyanChannel]));
|
||||
_channels.push_back(Magick::ChannelMoments(MagentaChannel,
|
||||
&channel_moments[MagentaChannel]));
|
||||
_channels.push_back(Magick::ChannelMoments(YellowChannel,
|
||||
&channel_moments[YellowChannel]));
|
||||
_channels.push_back(Magick::ChannelMoments(BlackChannel,
|
||||
&channel_moments[BlackChannel]));
|
||||
break;
|
||||
case GRAYColorspace:
|
||||
_channels.push_back(Magick::ChannelMoments(GrayChannel,
|
||||
&channel_moments[GrayChannel]));
|
||||
break;
|
||||
}
|
||||
if (image_.constImage()->matte != MagickFalse)
|
||||
_channels.push_back(Magick::ChannelMoments(AlphaChannel,
|
||||
&channel_moments[AlphaChannel]));
|
||||
if (image_.constImage()->colorspace != GRAYColorspace)
|
||||
_channels.push_back(Magick::ChannelMoments(CompositeChannels,
|
||||
&channel_moments[CompositeChannels]));
|
||||
channel_moments=(MagickCore::ChannelMoments *) RelinquishMagickMemory(
|
||||
channel_moments);
|
||||
}
|
||||
ThrowPPException(image_.quiet());
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2013-2015
|
||||
//
|
||||
// CoderInfo implementation
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/CoderInfo.h"
|
||||
#include "Magick++/Exception.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Magick::CoderInfo::CoderInfo(void)
|
||||
: _name(),
|
||||
_description(),
|
||||
_mimeType(),
|
||||
_isReadable(false),
|
||||
_isWritable(false),
|
||||
_isMultiFrame(false)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::CoderInfo::CoderInfo(const Magick::CoderInfo &coder_)
|
||||
{
|
||||
_name=coder_._name;
|
||||
_description=coder_._description;
|
||||
_mimeType=coder_._mimeType;
|
||||
_isReadable=coder_._isReadable;
|
||||
_isWritable=coder_._isWritable;
|
||||
_isMultiFrame=coder_._isMultiFrame;
|
||||
}
|
||||
|
||||
Magick::CoderInfo::CoderInfo(const std::string &name_)
|
||||
: _name(),
|
||||
_description(),
|
||||
_mimeType(),
|
||||
_isReadable(false),
|
||||
_isWritable(false),
|
||||
_isMultiFrame(false)
|
||||
{
|
||||
const Magick::MagickInfo
|
||||
*magickInfo;
|
||||
|
||||
GetPPException;
|
||||
magickInfo=GetMagickInfo(name_.c_str(),exceptionInfo);
|
||||
ThrowPPException(false);
|
||||
if (magickInfo == 0)
|
||||
{
|
||||
throwExceptionExplicit(OptionError,"Coder not found",name_.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
_name=std::string(magickInfo->name);
|
||||
_description=std::string(magickInfo->description);
|
||||
_mimeType=std::string(magickInfo->mime_type ? magickInfo->mime_type : "");
|
||||
_isReadable=((magickInfo->decoder == 0) ? false : true);
|
||||
_isWritable=((magickInfo->encoder == 0) ? false : true);
|
||||
_isMultiFrame=((magickInfo->adjoin == 0) ? false : true);
|
||||
}
|
||||
}
|
||||
|
||||
Magick::CoderInfo::~CoderInfo(void)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::CoderInfo& Magick::CoderInfo::operator=(const CoderInfo &coder_)
|
||||
{
|
||||
// If not being set to ourself
|
||||
if (this != &coder_)
|
||||
{
|
||||
_name=coder_._name;
|
||||
_description=coder_._description;
|
||||
_mimeType=coder_._mimeType;
|
||||
_isReadable=coder_._isReadable;
|
||||
_isWritable=coder_._isWritable;
|
||||
_isMultiFrame=coder_._isMultiFrame;
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
std::string Magick::CoderInfo::description(void) const
|
||||
{
|
||||
return(_description);
|
||||
}
|
||||
|
||||
bool Magick::CoderInfo::isReadable(void) const
|
||||
{
|
||||
return(_isReadable);
|
||||
}
|
||||
|
||||
bool Magick::CoderInfo::isWritable(void) const
|
||||
{
|
||||
return(_isWritable);
|
||||
}
|
||||
|
||||
bool Magick::CoderInfo::isMultiFrame(void) const
|
||||
{
|
||||
return(_isMultiFrame);
|
||||
}
|
||||
|
||||
std::string Magick::CoderInfo::mimeType(void) const
|
||||
{
|
||||
return(_mimeType);
|
||||
}
|
||||
|
||||
std::string Magick::CoderInfo::name(void) const
|
||||
{
|
||||
return(_name);
|
||||
}
|
||||
|
||||
bool Magick::CoderInfo::unregister(void) const
|
||||
{
|
||||
return(UnregisterMagickInfo(_name.c_str()) != MagickFalse);
|
||||
}
|
||||
|
||||
Magick::CoderInfo::CoderInfo(const MagickCore::MagickInfo *magickInfo_)
|
||||
: _name(std::string(magickInfo_->name ? magickInfo_->name : "")),
|
||||
_description(std::string(magickInfo_->description ? magickInfo_->description : "")),
|
||||
_mimeType(std::string(magickInfo_->mime_type ? magickInfo_->mime_type : "")),
|
||||
_isReadable(magickInfo_->decoder ? true : false),
|
||||
_isWritable(magickInfo_->encoder ? true : false),
|
||||
_isMultiFrame(magickInfo_->adjoin ? true : false)
|
||||
{
|
||||
}
|
@ -1,619 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014-2018
|
||||
//
|
||||
// Color Implementation
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
#include "Magick++/Color.h"
|
||||
#include "Magick++/Exception.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
MagickPPExport int Magick::operator == (const Magick::Color &left_,
|
||||
const Magick::Color &right_)
|
||||
{
|
||||
#if defined(MAGICKCORE_HDRI_SUPPORT)
|
||||
return((left_.isValid() == right_.isValid()) &&
|
||||
(fabs(left_.redQuantum()-right_.redQuantum()) < MagickEpsilon) &&
|
||||
(fabs(left_.greenQuantum()-right_.greenQuantum()) < MagickEpsilon) &&
|
||||
(fabs(left_.blueQuantum()-right_.blueQuantum()) < MagickEpsilon));
|
||||
#else
|
||||
return((left_.isValid() == right_.isValid()) &&
|
||||
(left_.redQuantum() == right_.redQuantum()) &&
|
||||
(left_.greenQuantum() == right_.greenQuantum()) &&
|
||||
(left_.blueQuantum() == right_.blueQuantum()));
|
||||
#endif
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator != (const Magick::Color &left_,
|
||||
const Magick::Color &right_)
|
||||
{
|
||||
return(!(left_ == right_));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator > (const Magick::Color &left_,
|
||||
const Magick::Color &right_)
|
||||
{
|
||||
return(!(left_ < right_ ) && (left_ != right_ ));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator < (const Magick::Color &left_,
|
||||
const Magick::Color &right_)
|
||||
{
|
||||
if(left_.redQuantum() < right_.redQuantum())
|
||||
return(true);
|
||||
if(left_.redQuantum() > right_.redQuantum())
|
||||
return(false);
|
||||
if(left_.greenQuantum() < right_.greenQuantum())
|
||||
return(true);
|
||||
if(left_.greenQuantum() > right_.greenQuantum())
|
||||
return(false);
|
||||
if(left_.blueQuantum() < right_.blueQuantum())
|
||||
return(true);
|
||||
return(false);
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator >= (const Magick::Color &left_,
|
||||
const Magick::Color &right_)
|
||||
{
|
||||
return((left_ > right_) || (left_ == right_));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator <= (const Magick::Color &left_,
|
||||
const Magick::Color &right_)
|
||||
{
|
||||
return((left_ < right_) || (left_ == right_));
|
||||
}
|
||||
|
||||
Magick::Color::Color(void)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(false),
|
||||
_pixelOwn(true),
|
||||
_pixelType(RGBAPixel)
|
||||
{
|
||||
initPixel();
|
||||
|
||||
_pixel->opacity=TransparentOpacity;
|
||||
}
|
||||
|
||||
Magick::Color::Color(Magick::Quantum red_,Magick::Quantum green_,
|
||||
Magick::Quantum blue_)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(true),
|
||||
_pixelOwn(true),
|
||||
_pixelType(RGBPixel)
|
||||
{
|
||||
redQuantum(red_);
|
||||
greenQuantum(green_);
|
||||
blueQuantum(blue_);
|
||||
alphaQuantum(OpaqueOpacity);
|
||||
}
|
||||
|
||||
Magick::Color::Color(Magick::Quantum red_,Magick::Quantum green_,
|
||||
Magick::Quantum blue_,Magick::Quantum alpha_)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(true),
|
||||
_pixelOwn(true),
|
||||
_pixelType(RGBAPixel)
|
||||
{
|
||||
redQuantum(red_);
|
||||
greenQuantum(green_);
|
||||
blueQuantum(blue_);
|
||||
alphaQuantum(alpha_);
|
||||
}
|
||||
|
||||
Magick::Color::Color(const char *x11color_)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(true),
|
||||
_pixelOwn(true),
|
||||
_pixelType(RGBPixel)
|
||||
{
|
||||
initPixel();
|
||||
|
||||
// Use operator = implementation
|
||||
*this=x11color_;
|
||||
}
|
||||
|
||||
Magick::Color::Color(const Magick::Color &color_)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(color_._isValid),
|
||||
_pixelOwn(true),
|
||||
_pixelType(color_._pixelType)
|
||||
{
|
||||
*_pixel=*color_._pixel;
|
||||
}
|
||||
|
||||
Magick::Color::Color(const PixelPacket &color_)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(true),
|
||||
_pixelOwn(true),
|
||||
_pixelType(RGBPixel)
|
||||
{
|
||||
*_pixel=color_;
|
||||
|
||||
if (color_.opacity != OpaqueOpacity)
|
||||
_pixelType=RGBAPixel;
|
||||
}
|
||||
|
||||
Magick::Color::Color(const std::string &x11color_)
|
||||
: _pixel(new PixelPacket),
|
||||
_isValid(true),
|
||||
_pixelOwn(true),
|
||||
_pixelType(RGBPixel)
|
||||
{
|
||||
initPixel();
|
||||
|
||||
// Use operator = implementation
|
||||
*this=x11color_;
|
||||
}
|
||||
|
||||
Magick::Color::~Color(void)
|
||||
{
|
||||
if (_pixelOwn)
|
||||
delete _pixel;
|
||||
|
||||
_pixel=(PixelPacket *)NULL;
|
||||
}
|
||||
|
||||
const Magick::Color& Magick::Color::operator=(const char *x11color_)
|
||||
{
|
||||
*this=std::string(x11color_);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::Color& Magick::Color::operator=(const Magick::Color& color_)
|
||||
{
|
||||
// If not being set to ourself
|
||||
if (this != &color_)
|
||||
{
|
||||
// Copy pixel value
|
||||
*_pixel=*color_._pixel;
|
||||
|
||||
// Validity
|
||||
_isValid=color_._isValid;
|
||||
|
||||
// Copy pixel type
|
||||
_pixelType=color_._pixelType;
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
const Magick::Color& Magick::Color::operator=
|
||||
(const MagickCore::PixelPacket &color_)
|
||||
{
|
||||
*_pixel=color_;
|
||||
if (color_.opacity != OpaqueOpacity)
|
||||
_pixelType=RGBAPixel;
|
||||
else
|
||||
_pixelType=RGBPixel;
|
||||
|
||||
return(*this);
|
||||
}
|
||||
|
||||
// Set color via X11 color specification string
|
||||
const Magick::Color& Magick::Color::operator=(const std::string &x11color_)
|
||||
{
|
||||
PixelPacket
|
||||
target_color;
|
||||
|
||||
initPixel();
|
||||
GetPPException;
|
||||
if (QueryColorDatabase(x11color_.c_str(),&target_color,exceptionInfo))
|
||||
{
|
||||
redQuantum( target_color.red );
|
||||
greenQuantum( target_color.green );
|
||||
blueQuantum( target_color.blue );
|
||||
alphaQuantum( target_color.opacity );
|
||||
|
||||
if (target_color.opacity > OpaqueOpacity)
|
||||
_pixelType=RGBAPixel;
|
||||
else
|
||||
_pixelType=RGBPixel;
|
||||
}
|
||||
else
|
||||
_isValid=false;
|
||||
ThrowPPException(false);
|
||||
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::Color::operator std::string() const
|
||||
{
|
||||
char
|
||||
colorbuf[MaxTextExtent];
|
||||
|
||||
MagickPixelPacket
|
||||
pixel;
|
||||
|
||||
if (!isValid())
|
||||
return std::string("none");
|
||||
|
||||
pixel.colorspace=sRGBColorspace;
|
||||
pixel.matte=_pixelType == RGBAPixel ? MagickTrue : MagickFalse;
|
||||
pixel.depth=MAGICKCORE_QUANTUM_DEPTH;
|
||||
pixel.red=_pixel->red;
|
||||
pixel.green=_pixel->green;
|
||||
pixel.blue=_pixel->blue;
|
||||
pixel.opacity=_pixel->opacity;
|
||||
GetColorTuple(&pixel,MagickTrue,colorbuf);
|
||||
|
||||
return(std::string(colorbuf));
|
||||
}
|
||||
|
||||
bool Magick::Color::isValid(void) const
|
||||
{
|
||||
return(_isValid);
|
||||
}
|
||||
|
||||
void Magick::Color::isValid(bool valid_)
|
||||
{
|
||||
if (bool(valid_) == bool(isValid()))
|
||||
return;
|
||||
|
||||
if (!_pixelOwn)
|
||||
{
|
||||
_pixel=new PixelPacket;
|
||||
_pixelOwn=true;
|
||||
}
|
||||
|
||||
_isValid=valid_;
|
||||
|
||||
initPixel();
|
||||
}
|
||||
|
||||
Magick::Color::Color(PixelPacket *rep_,PixelType pixelType_)
|
||||
: _pixel(rep_),
|
||||
_isValid(true),
|
||||
_pixelOwn(false),
|
||||
_pixelType(pixelType_)
|
||||
{
|
||||
}
|
||||
|
||||
void Magick::Color::pixel(PixelPacket *rep_,PixelType pixelType_)
|
||||
{
|
||||
if (_pixelOwn)
|
||||
delete _pixel;
|
||||
|
||||
_pixel=rep_;
|
||||
_pixelOwn=false;
|
||||
_isValid=true;
|
||||
_pixelType=pixelType_;
|
||||
}
|
||||
|
||||
Magick::ColorGray::ColorGray(void)
|
||||
: Color()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorGray::ColorGray(const Magick::Color & color_)
|
||||
: Color(color_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorGray::ColorGray(double shade_)
|
||||
: Color(scaleDoubleToQuantum(shade_),scaleDoubleToQuantum(shade_),
|
||||
scaleDoubleToQuantum(shade_))
|
||||
{
|
||||
alphaQuantum(OpaqueOpacity);
|
||||
}
|
||||
|
||||
Magick::ColorGray::~ColorGray()
|
||||
{
|
||||
}
|
||||
|
||||
void Magick::ColorGray::shade(double shade_)
|
||||
{
|
||||
Quantum gray=scaleDoubleToQuantum(shade_);
|
||||
redQuantum(gray);
|
||||
greenQuantum(gray);
|
||||
blueQuantum(gray);
|
||||
}
|
||||
|
||||
double Magick::ColorGray::shade(void) const
|
||||
{
|
||||
return(scaleQuantumToDouble(greenQuantum()));
|
||||
}
|
||||
|
||||
Magick::ColorGray& Magick::ColorGray::operator = ( const Magick::Color& color_ )
|
||||
{
|
||||
*static_cast<Magick::Color*>(this)=color_;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::ColorHSL::ColorHSL(void)
|
||||
: Color()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorHSL::ColorHSL(const Magick::Color & color_)
|
||||
: Color( color_ )
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorHSL::ColorHSL(double hue_,double saturation_,double luminosity_)
|
||||
: Color()
|
||||
{
|
||||
Quantum
|
||||
blue,
|
||||
green,
|
||||
red;
|
||||
|
||||
ConvertHSLToRGB(hue_,saturation_,luminosity_,&red,&green,&blue);
|
||||
|
||||
redQuantum(red);
|
||||
greenQuantum(green);
|
||||
blueQuantum(blue);
|
||||
alphaQuantum(OpaqueOpacity);
|
||||
}
|
||||
|
||||
Magick::ColorHSL::~ColorHSL()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorHSL& Magick::ColorHSL::operator=(const Magick::Color &color_)
|
||||
{
|
||||
*static_cast<Magick::Color*>(this)=color_;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
void Magick::ColorHSL::hue(double hue_)
|
||||
{
|
||||
double
|
||||
hue,
|
||||
luminosity,
|
||||
saturation;
|
||||
|
||||
Quantum
|
||||
blue,
|
||||
green,
|
||||
red;
|
||||
|
||||
ConvertRGBToHSL(redQuantum(),greenQuantum(),blueQuantum(),&hue,&saturation,
|
||||
&luminosity);
|
||||
|
||||
hue=hue_;
|
||||
|
||||
ConvertHSLToRGB(hue,saturation,luminosity,&red,&green,&blue);
|
||||
|
||||
redQuantum(red);
|
||||
greenQuantum(green);
|
||||
blueQuantum(blue);
|
||||
}
|
||||
|
||||
double Magick::ColorHSL::hue(void) const
|
||||
{
|
||||
double
|
||||
hue,
|
||||
luminosity,
|
||||
saturation;
|
||||
|
||||
ConvertRGBToHSL(redQuantum(),greenQuantum(),blueQuantum(),&hue,&saturation,
|
||||
&luminosity);
|
||||
|
||||
return(hue);
|
||||
}
|
||||
|
||||
void Magick::ColorHSL::luminosity(double luminosity_)
|
||||
{
|
||||
double
|
||||
hue,
|
||||
luminosity,
|
||||
saturation;
|
||||
|
||||
Quantum
|
||||
blue,
|
||||
green,
|
||||
red;
|
||||
|
||||
ConvertRGBToHSL(redQuantum(),greenQuantum(),blueQuantum(),&hue,&saturation,
|
||||
&luminosity);
|
||||
|
||||
luminosity=luminosity_;
|
||||
|
||||
ConvertHSLToRGB(hue,saturation,luminosity,&red,&green,&blue);
|
||||
|
||||
redQuantum(red);
|
||||
greenQuantum(green);
|
||||
blueQuantum(blue);
|
||||
}
|
||||
|
||||
double Magick::ColorHSL::luminosity(void) const
|
||||
{
|
||||
double
|
||||
hue,
|
||||
saturation,
|
||||
luminosity;
|
||||
|
||||
ConvertRGBToHSL(redQuantum(),greenQuantum(),blueQuantum(),&hue,&saturation,
|
||||
&luminosity);
|
||||
|
||||
return(luminosity);
|
||||
}
|
||||
|
||||
void Magick::ColorHSL::saturation(double saturation_)
|
||||
{
|
||||
double
|
||||
hue,
|
||||
luminosity,
|
||||
saturation;
|
||||
|
||||
Quantum
|
||||
blue,
|
||||
green,
|
||||
red;
|
||||
|
||||
ConvertRGBToHSL(redQuantum(),greenQuantum(),blueQuantum(),&hue,&saturation,
|
||||
&luminosity);
|
||||
|
||||
saturation=saturation_;
|
||||
|
||||
ConvertHSLToRGB(hue,saturation,luminosity,&red,&green,&blue);
|
||||
|
||||
redQuantum(red);
|
||||
greenQuantum(green);
|
||||
blueQuantum(blue);
|
||||
}
|
||||
|
||||
double Magick::ColorHSL::saturation(void) const
|
||||
{
|
||||
double
|
||||
hue,
|
||||
luminosity,
|
||||
saturation;
|
||||
|
||||
ConvertRGBToHSL(redQuantum(),greenQuantum(),blueQuantum(),&hue,&saturation,
|
||||
&luminosity);
|
||||
|
||||
return(saturation);
|
||||
}
|
||||
|
||||
Magick::ColorMono::ColorMono(void)
|
||||
: Color()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorMono::ColorMono(bool mono_)
|
||||
: Color((mono_ ? QuantumRange : 0),
|
||||
(mono_ ? QuantumRange : 0),
|
||||
(mono_ ? QuantumRange : 0))
|
||||
{
|
||||
alphaQuantum(OpaqueOpacity);
|
||||
}
|
||||
|
||||
Magick::ColorMono::ColorMono(const Magick::Color &color_)
|
||||
: Color(color_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorMono::~ColorMono()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorMono& Magick::ColorMono::operator=(const Magick::Color &color_)
|
||||
{
|
||||
*static_cast<Magick::Color*>(this)=color_;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
void Magick::ColorMono::mono(bool mono_)
|
||||
{
|
||||
redQuantum(mono_ ? QuantumRange : 0);
|
||||
greenQuantum(mono_ ? QuantumRange : 0);
|
||||
blueQuantum(mono_ ? QuantumRange : 0);
|
||||
}
|
||||
|
||||
bool Magick::ColorMono::mono(void) const
|
||||
{
|
||||
return(greenQuantum() == 0);
|
||||
}
|
||||
|
||||
Magick::ColorRGB::ColorRGB(void)
|
||||
: Color()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorRGB::ColorRGB(const Magick::Color & color_)
|
||||
: Color(color_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorRGB::ColorRGB(double red_,double green_,double blue_)
|
||||
: Color(scaleDoubleToQuantum(red_),scaleDoubleToQuantum(green_),
|
||||
scaleDoubleToQuantum(blue_))
|
||||
{
|
||||
alphaQuantum(OpaqueOpacity);
|
||||
}
|
||||
|
||||
Magick::ColorRGB::~ColorRGB(void)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorRGB& Magick::ColorRGB::operator=(const Magick::Color& color_)
|
||||
{
|
||||
*static_cast<Magick::Color*>(this)=color_;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::ColorYUV::ColorYUV(void)
|
||||
: Color()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorYUV::ColorYUV(const Magick::Color &color_)
|
||||
: Color(color_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorYUV::ColorYUV(double y_,double u_,double v_)
|
||||
: Color(scaleDoubleToQuantum(y_ + 1.13980 * v_),
|
||||
scaleDoubleToQuantum(y_ - (0.39380 * u_) - (0.58050 * v_)),
|
||||
scaleDoubleToQuantum(y_ + 2.02790 * u_))
|
||||
{
|
||||
alphaQuantum(OpaqueOpacity);
|
||||
}
|
||||
|
||||
Magick::ColorYUV::~ColorYUV(void)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ColorYUV& Magick::ColorYUV::operator=(const Magick::Color &color_)
|
||||
{
|
||||
*static_cast<Magick::Color*>(this)=color_;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
void Magick::ColorYUV::u(double u_)
|
||||
{
|
||||
double V = v();
|
||||
double Y = y();
|
||||
|
||||
redQuantum(scaleDoubleToQuantum(Y + 1.13980 * V ));
|
||||
greenQuantum(scaleDoubleToQuantum( Y - (0.39380 * u_) - (0.58050 * V)));
|
||||
blueQuantum(scaleDoubleToQuantum( Y + 2.02790 * u_));
|
||||
}
|
||||
|
||||
double Magick::ColorYUV::u(void) const
|
||||
{
|
||||
return scaleQuantumToDouble((-0.14740 * redQuantum()) - (0.28950 *
|
||||
greenQuantum()) + (0.43690 * blueQuantum()));
|
||||
}
|
||||
|
||||
void Magick::ColorYUV::v(double v_)
|
||||
{
|
||||
double U = u();
|
||||
double Y = y();
|
||||
|
||||
redQuantum(scaleDoubleToQuantum( Y + 1.13980 * v_ ));
|
||||
greenQuantum(scaleDoubleToQuantum( Y - (0.39380 * U) - (0.58050 * v_) ));
|
||||
blueQuantum(scaleDoubleToQuantum( Y + 2.02790 * U ));
|
||||
}
|
||||
|
||||
double Magick::ColorYUV::v(void) const
|
||||
{
|
||||
return scaleQuantumToDouble((0.61500 * redQuantum()) - (0.51500 *
|
||||
greenQuantum()) - (0.10000 * blueQuantum()));
|
||||
}
|
||||
|
||||
void Magick::ColorYUV::y(double y_)
|
||||
{
|
||||
double U = u();
|
||||
double V = v();
|
||||
|
||||
redQuantum(scaleDoubleToQuantum(y_ + 1.13980 * V));
|
||||
greenQuantum(scaleDoubleToQuantum(y_ - (0.39380 * U) - (0.58050 * V)));
|
||||
blueQuantum(scaleDoubleToQuantum(y_ + 2.02790 * U));
|
||||
}
|
||||
|
||||
double Magick::ColorYUV::y(void) const
|
||||
{
|
||||
return scaleQuantumToDouble((0.29900 * redQuantum()) + (0.58700 *
|
||||
greenQuantum()) + (0.11400 * blueQuantum()));
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,984 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014-2017
|
||||
//
|
||||
// Implementation of Exception and derived classes
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Magick++/Exception.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Magick::Exception::Exception(const std::string& what_)
|
||||
: std::exception(),
|
||||
_what(what_),
|
||||
_nested((Exception *) NULL)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Exception::Exception(const std::string& what_,
|
||||
Exception* nested_)
|
||||
: std::exception(),
|
||||
_what(what_),
|
||||
_nested(nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Exception::Exception(const Magick::Exception& original_)
|
||||
: exception(original_),
|
||||
_what(original_._what),
|
||||
_nested((Exception *) NULL)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Exception::~Exception() throw()
|
||||
{
|
||||
if (_nested != (Exception *) NULL)
|
||||
delete _nested;
|
||||
}
|
||||
|
||||
Magick::Exception& Magick::Exception::operator=(
|
||||
const Magick::Exception& original_)
|
||||
{
|
||||
if (this != &original_)
|
||||
this->_what=original_._what;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
const char* Magick::Exception::what() const throw()
|
||||
{
|
||||
return(_what.c_str());
|
||||
}
|
||||
|
||||
const Magick::Exception* Magick::Exception::nested() const throw()
|
||||
{
|
||||
return(_nested);
|
||||
}
|
||||
|
||||
void Magick::Exception::nested(Exception* nested_) throw()
|
||||
{
|
||||
_nested=nested_;
|
||||
}
|
||||
|
||||
Magick::Error::Error(const std::string& what_)
|
||||
: Exception(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Error::Error(const std::string& what_,Exception *nested_)
|
||||
: Exception(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Error::~Error() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorBlob::ErrorBlob(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorBlob::ErrorBlob(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorBlob::~ErrorBlob() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCache::ErrorCache(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCache::ErrorCache(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCache::~ErrorCache() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCoder::ErrorCoder(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCoder::ErrorCoder(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCoder::~ErrorCoder() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorConfigure::ErrorConfigure(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorConfigure::ErrorConfigure(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorConfigure::~ErrorConfigure() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCorruptImage::ErrorCorruptImage(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCorruptImage::ErrorCorruptImage(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorCorruptImage::~ErrorCorruptImage() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorDelegate::ErrorDelegate(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorDelegate::ErrorDelegate(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorDelegate::~ErrorDelegate()throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorDraw::ErrorDraw(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorDraw::ErrorDraw(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorDraw::~ErrorDraw() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorFileOpen::ErrorFileOpen(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorFileOpen::~ErrorFileOpen() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorFileOpen::ErrorFileOpen(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Magick::ErrorImage::ErrorImage(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorImage::ErrorImage(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorImage::~ErrorImage() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorMissingDelegate::ErrorMissingDelegate(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorMissingDelegate::ErrorMissingDelegate(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorMissingDelegate::~ErrorMissingDelegate() throw ()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorModule::ErrorModule(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorModule::ErrorModule(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorModule::~ErrorModule() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorMonitor::ErrorMonitor(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorMonitor::ErrorMonitor(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorMonitor::~ErrorMonitor() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorOption::ErrorOption(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorOption::ErrorOption(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorOption::~ErrorOption() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorPolicy::ErrorPolicy(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorPolicy::ErrorPolicy(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorPolicy::~ErrorPolicy() throw()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Magick::ErrorRegistry::ErrorRegistry(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorRegistry::ErrorRegistry(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorRegistry::~ErrorRegistry() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorResourceLimit::ErrorResourceLimit(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorResourceLimit::ErrorResourceLimit(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorResourceLimit::~ErrorResourceLimit() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorStream::ErrorStream(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorStream::ErrorStream(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorStream::~ErrorStream() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorType::ErrorType(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorType::ErrorType(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorType::~ErrorType() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorUndefined::ErrorUndefined(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorUndefined::ErrorUndefined(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorUndefined::~ErrorUndefined() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorXServer::ErrorXServer(const std::string& what_)
|
||||
: Error(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorXServer::ErrorXServer(const std::string& what_,Exception *nested_)
|
||||
: Error(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ErrorXServer::~ErrorXServer() throw ()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Warning::Warning(const std::string& what_)
|
||||
: Exception(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Warning::Warning(const std::string& what_,Exception *nested_)
|
||||
: Exception(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Warning::~Warning() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningBlob::WarningBlob(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningBlob::WarningBlob(const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningBlob::~WarningBlob() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCache::WarningCache(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCache::WarningCache(const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCache::~WarningCache() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCoder::WarningCoder(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCoder::WarningCoder(const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCoder::~WarningCoder() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningConfigure::WarningConfigure(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningConfigure::WarningConfigure(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningConfigure::~WarningConfigure() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCorruptImage::WarningCorruptImage(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCorruptImage::WarningCorruptImage(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningCorruptImage::~WarningCorruptImage() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningDelegate::WarningDelegate(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningDelegate::WarningDelegate(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningDelegate::~WarningDelegate() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningDraw::WarningDraw(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningDraw::WarningDraw(const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningDraw::~WarningDraw() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningFileOpen::WarningFileOpen(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningFileOpen::WarningFileOpen(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningFileOpen::~WarningFileOpen() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningImage::WarningImage(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningImage::WarningImage(const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningImage::~WarningImage() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningMissingDelegate::WarningMissingDelegate(
|
||||
const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningMissingDelegate::WarningMissingDelegate(
|
||||
const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningMissingDelegate::~WarningMissingDelegate() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningModule::WarningModule(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningModule::WarningModule(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Magick::WarningModule::~WarningModule() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningMonitor::WarningMonitor(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningMonitor::WarningMonitor(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningMonitor::~WarningMonitor() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningOption::WarningOption(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningOption::WarningOption(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningOption::~WarningOption() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningRegistry::WarningRegistry(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningRegistry::WarningRegistry(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningRegistry::~WarningRegistry() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningPolicy::WarningPolicy(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningPolicy::WarningPolicy(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningPolicy::~WarningPolicy() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningResourceLimit::WarningResourceLimit(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningResourceLimit::WarningResourceLimit(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningResourceLimit::~WarningResourceLimit() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningStream::WarningStream(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningStream::WarningStream(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningStream::~WarningStream() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningType::WarningType(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningType::WarningType(const std::string& what_,Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningType::~WarningType() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningUndefined::WarningUndefined(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningUndefined::WarningUndefined(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningUndefined::~WarningUndefined() throw()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningXServer::WarningXServer(const std::string& what_)
|
||||
: Warning(what_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningXServer::WarningXServer(const std::string& what_,
|
||||
Exception *nested_)
|
||||
: Warning(what_,nested_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::WarningXServer::~WarningXServer() throw()
|
||||
{
|
||||
}
|
||||
|
||||
std::string Magick::formatExceptionMessage(const MagickCore::ExceptionInfo *exception_)
|
||||
{
|
||||
// Format error message ImageMagick-style
|
||||
std::string message=GetClientName();
|
||||
if (exception_->reason != (char *) NULL)
|
||||
{
|
||||
message+=std::string(": ");
|
||||
message+=std::string(exception_->reason);
|
||||
}
|
||||
|
||||
if (exception_->description != (char *) NULL)
|
||||
message += " (" + std::string(exception_->description) + ")";
|
||||
return(message);
|
||||
}
|
||||
|
||||
Magick::Exception* Magick::createException(const MagickCore::ExceptionInfo *exception_)
|
||||
{
|
||||
std::string message=formatExceptionMessage(exception_);
|
||||
switch (exception_->severity)
|
||||
{
|
||||
case BlobError:
|
||||
case BlobFatalError:
|
||||
return new ErrorBlob(message);
|
||||
case BlobWarning:
|
||||
return new WarningBlob(message);
|
||||
case CacheError:
|
||||
case CacheFatalError:
|
||||
return new ErrorCache(message);
|
||||
case CacheWarning:
|
||||
return new WarningCache(message);
|
||||
case CoderError:
|
||||
case CoderFatalError:
|
||||
return new ErrorCoder(message);
|
||||
case CoderWarning:
|
||||
return new WarningCoder(message);
|
||||
case ConfigureError:
|
||||
case ConfigureFatalError:
|
||||
return new ErrorConfigure(message);
|
||||
case ConfigureWarning:
|
||||
return new WarningConfigure(message);
|
||||
case CorruptImageError:
|
||||
case CorruptImageFatalError:
|
||||
return new ErrorCorruptImage(message);
|
||||
case CorruptImageWarning:
|
||||
return new WarningCorruptImage(message);
|
||||
case DelegateError:
|
||||
case DelegateFatalError:
|
||||
return new ErrorDelegate(message);
|
||||
case DelegateWarning:
|
||||
return new WarningDelegate(message);
|
||||
case DrawError:
|
||||
case DrawFatalError:
|
||||
return new ErrorDraw(message);
|
||||
case DrawWarning:
|
||||
return new WarningDraw(message);
|
||||
case FileOpenError:
|
||||
case FileOpenFatalError:
|
||||
return new ErrorFileOpen(message);
|
||||
case FileOpenWarning:
|
||||
return new WarningFileOpen(message);
|
||||
case ImageError:
|
||||
case ImageFatalError:
|
||||
return new ErrorImage(message);
|
||||
case ImageWarning:
|
||||
return new WarningImage(message);
|
||||
case MissingDelegateError:
|
||||
case MissingDelegateFatalError:
|
||||
return new ErrorMissingDelegate(message);
|
||||
case MissingDelegateWarning:
|
||||
return new WarningMissingDelegate(message);
|
||||
case ModuleError:
|
||||
case ModuleFatalError:
|
||||
return new ErrorModule(message);
|
||||
case ModuleWarning:
|
||||
return new WarningModule(message);
|
||||
case MonitorError:
|
||||
case MonitorFatalError:
|
||||
return new ErrorMonitor(message);
|
||||
case MonitorWarning:
|
||||
return new WarningMonitor(message);
|
||||
case OptionError:
|
||||
case OptionFatalError:
|
||||
return new ErrorOption(message);
|
||||
case OptionWarning:
|
||||
return new WarningOption(message);
|
||||
case PolicyWarning:
|
||||
return new WarningPolicy(message);
|
||||
case PolicyError:
|
||||
case PolicyFatalError:
|
||||
return new ErrorPolicy(message);
|
||||
case RegistryError:
|
||||
case RegistryFatalError:
|
||||
return new ErrorRegistry(message);
|
||||
case RegistryWarning:
|
||||
return new WarningRegistry(message);
|
||||
case ResourceLimitError:
|
||||
case ResourceLimitFatalError:
|
||||
return new ErrorResourceLimit(message);
|
||||
case ResourceLimitWarning:
|
||||
return new WarningResourceLimit(message);
|
||||
case StreamError:
|
||||
case StreamFatalError:
|
||||
return new ErrorStream(message);
|
||||
case StreamWarning:
|
||||
return new WarningStream(message);
|
||||
case TypeError:
|
||||
case TypeFatalError:
|
||||
return new ErrorType(message);
|
||||
case TypeWarning:
|
||||
return new WarningType(message);
|
||||
case UndefinedException:
|
||||
default:
|
||||
return new ErrorUndefined(message);
|
||||
case XServerError:
|
||||
case XServerFatalError:
|
||||
return new ErrorXServer(message);
|
||||
case XServerWarning:
|
||||
return new WarningXServer(message);
|
||||
}
|
||||
}
|
||||
|
||||
MagickPPExport void Magick::throwExceptionExplicit(
|
||||
const ExceptionType severity_,const char* reason_,const char* description_)
|
||||
{
|
||||
// Just return if there is no reported error
|
||||
if (severity_ == UndefinedException)
|
||||
return;
|
||||
|
||||
GetPPException;
|
||||
ThrowException(exceptionInfo,severity_,reason_, description_);
|
||||
ThrowPPException(false);
|
||||
}
|
||||
|
||||
MagickPPExport void Magick::throwException(ExceptionInfo *exception_,
|
||||
const bool quiet_)
|
||||
{
|
||||
const ExceptionInfo
|
||||
*p;
|
||||
|
||||
Exception
|
||||
*nestedException,
|
||||
*q;
|
||||
|
||||
ExceptionType
|
||||
severity;
|
||||
|
||||
size_t
|
||||
index;
|
||||
|
||||
// Just return if there is no reported error
|
||||
if (exception_->severity == UndefinedException)
|
||||
return;
|
||||
|
||||
std::string message=formatExceptionMessage(exception_);
|
||||
nestedException=(Exception *) NULL;
|
||||
q=(Exception *) NULL;
|
||||
LockSemaphoreInfo(exception_->semaphore);
|
||||
if (exception_->exceptions != (void *) NULL)
|
||||
{
|
||||
index=GetNumberOfElementsInLinkedList((LinkedListInfo *)
|
||||
exception_->exceptions);
|
||||
while(index > 0)
|
||||
{
|
||||
p=(const ExceptionInfo *) GetValueFromLinkedList((LinkedListInfo *)
|
||||
exception_->exceptions,--index);
|
||||
if ((p->severity != exception_->severity) || (LocaleCompare(p->reason,
|
||||
exception_->reason) != 0) || (LocaleCompare(p->description,
|
||||
exception_->description) != 0))
|
||||
{
|
||||
if (nestedException == (Exception *) NULL)
|
||||
{
|
||||
nestedException=createException(p);
|
||||
q=nestedException;
|
||||
}
|
||||
else
|
||||
{
|
||||
Exception
|
||||
*r;
|
||||
|
||||
r=createException(p);
|
||||
q->nested(r);
|
||||
q=r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
severity=exception_->severity;
|
||||
UnlockSemaphoreInfo(exception_->semaphore);
|
||||
|
||||
if ((quiet_) && (severity < MagickCore::ErrorException))
|
||||
{
|
||||
delete nestedException;
|
||||
return;
|
||||
}
|
||||
|
||||
DestroyExceptionInfo(exception_);
|
||||
|
||||
switch (severity)
|
||||
{
|
||||
case BlobError:
|
||||
case BlobFatalError:
|
||||
throw ErrorBlob(message,nestedException);
|
||||
case BlobWarning:
|
||||
throw WarningBlob(message,nestedException);
|
||||
case CacheError:
|
||||
case CacheFatalError:
|
||||
throw ErrorCache(message,nestedException);
|
||||
case CacheWarning:
|
||||
throw WarningCache(message,nestedException);
|
||||
case CoderError:
|
||||
case CoderFatalError:
|
||||
throw ErrorCoder(message,nestedException);
|
||||
case CoderWarning:
|
||||
throw WarningCoder(message,nestedException);
|
||||
case ConfigureError:
|
||||
case ConfigureFatalError:
|
||||
throw ErrorConfigure(message,nestedException);
|
||||
case ConfigureWarning:
|
||||
throw WarningConfigure(message,nestedException);
|
||||
case CorruptImageError:
|
||||
case CorruptImageFatalError:
|
||||
throw ErrorCorruptImage(message,nestedException);
|
||||
case CorruptImageWarning:
|
||||
throw WarningCorruptImage(message,nestedException);
|
||||
case DelegateError:
|
||||
case DelegateFatalError:
|
||||
throw ErrorDelegate(message,nestedException);
|
||||
case DelegateWarning:
|
||||
throw WarningDelegate(message,nestedException);
|
||||
case DrawError:
|
||||
case DrawFatalError:
|
||||
throw ErrorDraw(message,nestedException);
|
||||
case DrawWarning:
|
||||
throw WarningDraw(message,nestedException);
|
||||
case FileOpenError:
|
||||
case FileOpenFatalError:
|
||||
throw ErrorFileOpen(message,nestedException);
|
||||
case FileOpenWarning:
|
||||
throw WarningFileOpen(message,nestedException);
|
||||
case ImageError:
|
||||
case ImageFatalError:
|
||||
throw ErrorImage(message,nestedException);
|
||||
case ImageWarning:
|
||||
throw WarningImage(message,nestedException);
|
||||
case MissingDelegateError:
|
||||
case MissingDelegateFatalError:
|
||||
throw ErrorMissingDelegate(message,nestedException);
|
||||
case MissingDelegateWarning:
|
||||
throw WarningMissingDelegate(message,nestedException);
|
||||
case ModuleError:
|
||||
case ModuleFatalError:
|
||||
throw ErrorModule(message,nestedException);
|
||||
case ModuleWarning:
|
||||
throw WarningModule(message,nestedException);
|
||||
case MonitorError:
|
||||
case MonitorFatalError:
|
||||
throw ErrorMonitor(message,nestedException);
|
||||
case MonitorWarning:
|
||||
throw WarningMonitor(message,nestedException);
|
||||
case OptionError:
|
||||
case OptionFatalError:
|
||||
throw ErrorOption(message,nestedException);
|
||||
case OptionWarning:
|
||||
throw WarningOption(message,nestedException);
|
||||
case PolicyWarning:
|
||||
throw WarningPolicy(message,nestedException);
|
||||
case PolicyError:
|
||||
case PolicyFatalError:
|
||||
throw ErrorPolicy(message,nestedException);
|
||||
case RegistryError:
|
||||
case RegistryFatalError:
|
||||
throw ErrorRegistry(message,nestedException);
|
||||
case RegistryWarning:
|
||||
throw WarningRegistry(message,nestedException);
|
||||
case ResourceLimitError:
|
||||
case ResourceLimitFatalError:
|
||||
throw ErrorResourceLimit(message,nestedException);
|
||||
case ResourceLimitWarning:
|
||||
throw WarningResourceLimit(message,nestedException);
|
||||
case StreamError:
|
||||
case StreamFatalError:
|
||||
throw ErrorStream(message,nestedException);
|
||||
case StreamWarning:
|
||||
throw WarningStream(message,nestedException);
|
||||
case TypeError:
|
||||
case TypeFatalError:
|
||||
throw ErrorType(message,nestedException);
|
||||
case TypeWarning:
|
||||
throw WarningType(message,nestedException);
|
||||
case UndefinedException:
|
||||
default:
|
||||
throw ErrorUndefined(message,nestedException);
|
||||
case XServerError:
|
||||
case XServerFatalError:
|
||||
throw ErrorXServer(message,nestedException);
|
||||
case XServerWarning:
|
||||
throw WarningXServer(message,nestedException);
|
||||
}
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014-2016
|
||||
//
|
||||
// Simple C++ function wrappers for ImageMagick equivalents
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
#include "Magick++/Functions.h"
|
||||
#include "Magick++/Exception.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static bool magick_initialized=false;
|
||||
|
||||
MagickPPExport void Magick::CloneString(char **destination_,
|
||||
const std::string &source_)
|
||||
{
|
||||
MagickCore::CloneString(destination_,source_.c_str());
|
||||
}
|
||||
|
||||
MagickPPExport void Magick::DisableOpenCL(void)
|
||||
{
|
||||
GetPPException;
|
||||
MagickCore::InitImageMagickOpenCL(MagickCore::MAGICK_OPENCL_OFF,NULL,NULL,
|
||||
exceptionInfo);
|
||||
ThrowPPException(false);
|
||||
}
|
||||
|
||||
MagickPPExport bool Magick::EnableOpenCL(const bool useCache_)
|
||||
{
|
||||
bool
|
||||
status;
|
||||
|
||||
GetPPException;
|
||||
if (useCache_)
|
||||
status=MagickCore::InitImageMagickOpenCL(
|
||||
MagickCore::MAGICK_OPENCL_DEVICE_SELECT_AUTO,NULL,NULL,exceptionInfo) ==
|
||||
MagickTrue;
|
||||
else
|
||||
status=MagickCore::InitImageMagickOpenCL(
|
||||
MagickCore::MAGICK_OPENCL_DEVICE_SELECT_AUTO_CLEAR_CACHE,NULL,NULL,
|
||||
exceptionInfo) == MagickTrue;
|
||||
ThrowPPException(false);
|
||||
return(status);
|
||||
}
|
||||
|
||||
MagickPPExport void Magick::InitializeMagick(const char *path_)
|
||||
{
|
||||
MagickCore::MagickCoreGenesis(path_,MagickFalse);
|
||||
if (!magick_initialized)
|
||||
magick_initialized=true;
|
||||
}
|
||||
|
||||
MagickPPExport void Magick::SetRandomSeed(const unsigned long seed)
|
||||
{
|
||||
MagickCore::SetRandomSecretKey(seed);
|
||||
}
|
||||
|
||||
MagickPPExport void Magick::TerminateMagick(void)
|
||||
{
|
||||
if (magick_initialized)
|
||||
{
|
||||
magick_initialized=false;
|
||||
MagickCore::MagickCoreTerminus();
|
||||
}
|
||||
}
|
@ -1,488 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Geometry implementation
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
#include <ctype.h> // for isdigit
|
||||
#if !defined(MAGICKCORE_WINDOWS_SUPPORT)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "Magick++/Geometry.h"
|
||||
#include "Magick++/Exception.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
MagickPPExport int Magick::operator == (const Magick::Geometry& left_,
|
||||
const Magick::Geometry& right_)
|
||||
{
|
||||
return((left_.aspect() == right_.aspect()) &&
|
||||
(left_.fillArea() == right_.fillArea()) &&
|
||||
(left_.greater() == right_.greater()) &&
|
||||
(left_.height() == right_.height()) &&
|
||||
(left_.isValid() == right_.isValid()) &&
|
||||
(left_.less() == right_.less()) &&
|
||||
(left_.limitPixels() == right_.limitPixels()) &&
|
||||
(left_.percent() == right_.percent()) &&
|
||||
(left_.width() == right_.width()) &&
|
||||
(left_.xNegative() == right_.xNegative()) &&
|
||||
(left_.xOff() == right_.xOff()) &&
|
||||
(left_.yNegative() == right_.yNegative()) &&
|
||||
(left_.yOff() == right_.yOff()));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator != (const Magick::Geometry& left_,
|
||||
const Magick::Geometry& right_)
|
||||
{
|
||||
return(!(left_ == right_));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator > (const Magick::Geometry& left_,
|
||||
const Magick::Geometry& right_)
|
||||
{
|
||||
return(!(left_ < right_) && (left_ != right_));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator < (const Magick::Geometry& left_,
|
||||
const Magick::Geometry& right_)
|
||||
{
|
||||
return((left_.width()*left_.height()) < (right_.width()*right_.height()));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator >= (const Magick::Geometry& left_,
|
||||
const Magick::Geometry& right_)
|
||||
{
|
||||
return((left_ > right_) || (left_ == right_));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator <= (const Magick::Geometry& left_,
|
||||
const Magick::Geometry& right_ )
|
||||
{
|
||||
return((left_ < right_) || (left_ == right_));
|
||||
}
|
||||
|
||||
Magick::Geometry::Geometry(void)
|
||||
: _width(0),
|
||||
_height(0),
|
||||
_xOff(0),
|
||||
_yOff(0),
|
||||
_xNegative(false),
|
||||
_yNegative(false),
|
||||
_isValid(false),
|
||||
_percent(false),
|
||||
_aspect(false),
|
||||
_greater(false),
|
||||
_less(false),
|
||||
_fillArea(false),
|
||||
_limitPixels(false)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Geometry::Geometry(const char *geometry_)
|
||||
: _width(0),
|
||||
_height(0),
|
||||
_xOff(0),
|
||||
_yOff(0),
|
||||
_xNegative(false),
|
||||
_yNegative(false),
|
||||
_isValid(false),
|
||||
_percent(false),
|
||||
_aspect(false),
|
||||
_greater(false),
|
||||
_less(false),
|
||||
_fillArea(false),
|
||||
_limitPixels(false)
|
||||
{
|
||||
*this=geometry_; // Use assignment operator
|
||||
}
|
||||
|
||||
Magick::Geometry::Geometry(const Geometry &geometry_)
|
||||
: _width(geometry_._width),
|
||||
_height(geometry_._height),
|
||||
_xOff(geometry_._xOff),
|
||||
_yOff(geometry_._yOff),
|
||||
_xNegative(geometry_._xNegative),
|
||||
_yNegative(geometry_._yNegative),
|
||||
_isValid(geometry_._isValid),
|
||||
_percent(geometry_._percent),
|
||||
_aspect(geometry_._aspect),
|
||||
_greater(geometry_._greater),
|
||||
_less(geometry_._less),
|
||||
_fillArea(geometry_._fillArea),
|
||||
_limitPixels(geometry_._limitPixels)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Geometry::Geometry(const std::string &geometry_)
|
||||
: _width(0),
|
||||
_height(0),
|
||||
_xOff(0),
|
||||
_yOff(0),
|
||||
_xNegative(false),
|
||||
_yNegative(false),
|
||||
_isValid(false),
|
||||
_percent(false),
|
||||
_aspect(false),
|
||||
_greater(false),
|
||||
_less(false),
|
||||
_fillArea(false),
|
||||
_limitPixels(false)
|
||||
{
|
||||
*this=geometry_; // Use assignment operator
|
||||
}
|
||||
|
||||
Magick::Geometry::Geometry(size_t width_,size_t height_,ssize_t xOff_,
|
||||
ssize_t yOff_,bool xNegative_,bool yNegative_)
|
||||
: _width(width_),
|
||||
_height(height_),
|
||||
_xOff(xOff_),
|
||||
_yOff(yOff_),
|
||||
_xNegative(xNegative_),
|
||||
_yNegative(yNegative_),
|
||||
_isValid(true),
|
||||
_percent(false),
|
||||
_aspect(false),
|
||||
_greater(false),
|
||||
_less(false),
|
||||
_fillArea(false),
|
||||
_limitPixels(false)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Geometry::~Geometry(void)
|
||||
{
|
||||
}
|
||||
|
||||
const Magick::Geometry& Magick::Geometry::operator=(const char * geometry_)
|
||||
{
|
||||
*this=std::string(geometry_);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::Geometry& Magick::Geometry::operator=(const Geometry& geometry_)
|
||||
{
|
||||
// If not being set to ourself
|
||||
if (this != &geometry_)
|
||||
{
|
||||
_width=geometry_._width;
|
||||
_height=geometry_._height;
|
||||
_xOff=geometry_._xOff;
|
||||
_yOff=geometry_._yOff;
|
||||
_xNegative=geometry_._xNegative;
|
||||
_yNegative=geometry_._yNegative;
|
||||
_isValid=geometry_._isValid;
|
||||
_percent=geometry_._percent;
|
||||
_aspect=geometry_._aspect;
|
||||
_greater=geometry_._greater;
|
||||
_less=geometry_._less;
|
||||
_fillArea=geometry_._fillArea;
|
||||
_limitPixels=geometry_._limitPixels;
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
const Magick::Geometry& Magick::Geometry::operator=(
|
||||
const std::string &geometry_)
|
||||
{
|
||||
char
|
||||
geom[MaxTextExtent];
|
||||
|
||||
char
|
||||
*pageptr;
|
||||
|
||||
ssize_t
|
||||
flags,
|
||||
x = 0,
|
||||
y = 0;
|
||||
|
||||
size_t
|
||||
height_val=0,
|
||||
width_val=0;
|
||||
|
||||
// If argument does not start with digit, presume that it is a
|
||||
// page-size specification that needs to be converted to an
|
||||
// equivalent geometry specification using PostscriptGeometry()
|
||||
(void) CopyMagickString(geom,geometry_.c_str(),MaxTextExtent);
|
||||
if (geom[0] != '-' && geom[0] != '+' && geom[0] != 'x' &&
|
||||
!isdigit(static_cast<int>(geom[0])))
|
||||
{
|
||||
pageptr=GetPageGeometry(geom);
|
||||
if (pageptr != 0)
|
||||
{
|
||||
(void) CopyMagickString(geom,pageptr,MaxTextExtent);
|
||||
pageptr=(char *) RelinquishMagickMemory(pageptr);
|
||||
}
|
||||
}
|
||||
|
||||
flags=GetGeometry(geom,&x,&y,&width_val,&height_val);
|
||||
|
||||
if (flags == NoValue)
|
||||
{
|
||||
// Total failure!
|
||||
*this=Geometry();
|
||||
isValid(false);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
if ((flags & WidthValue) != 0)
|
||||
{
|
||||
_width=width_val;
|
||||
isValid(true);
|
||||
}
|
||||
|
||||
if ((flags & HeightValue) != 0)
|
||||
{
|
||||
_height=height_val;
|
||||
isValid(true);
|
||||
}
|
||||
|
||||
if ((flags & XValue) != 0)
|
||||
{
|
||||
_xOff=static_cast<ssize_t>(x);
|
||||
isValid(true);
|
||||
}
|
||||
|
||||
if ((flags & YValue) != 0)
|
||||
{
|
||||
_yOff=static_cast<ssize_t>(y);
|
||||
isValid(true);
|
||||
}
|
||||
|
||||
if ((flags & XNegative) != 0)
|
||||
_xNegative=true;
|
||||
|
||||
if ((flags & YNegative) != 0)
|
||||
_yNegative=true;
|
||||
|
||||
if ((flags & PercentValue) != 0)
|
||||
_percent=true;
|
||||
|
||||
if ((flags & AspectValue) != 0)
|
||||
_aspect=true;
|
||||
|
||||
if ((flags & LessValue) != 0)
|
||||
_less=true;
|
||||
|
||||
if ((flags & GreaterValue) != 0)
|
||||
_greater=true;
|
||||
|
||||
if ((flags & MinimumValue) != 0)
|
||||
_fillArea=true;
|
||||
|
||||
if ((flags & AreaValue) != 0)
|
||||
_limitPixels=true;
|
||||
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::Geometry::operator std::string() const
|
||||
{
|
||||
char
|
||||
buffer[MaxTextExtent];
|
||||
|
||||
std::string
|
||||
geometry;
|
||||
|
||||
if (!isValid())
|
||||
throwExceptionExplicit(OptionError,"Invalid geometry argument");
|
||||
|
||||
if (_width)
|
||||
{
|
||||
FormatLocaleString(buffer,MaxTextExtent,"%.20g",(double) _width);
|
||||
geometry+=buffer;
|
||||
}
|
||||
|
||||
if (_height)
|
||||
{
|
||||
FormatLocaleString(buffer,MaxTextExtent,"%.20g",(double) _height);
|
||||
geometry+='x';
|
||||
geometry+=buffer;
|
||||
}
|
||||
|
||||
if (_xOff || _yOff)
|
||||
{
|
||||
if (_xNegative)
|
||||
geometry+='-';
|
||||
else
|
||||
geometry+='+';
|
||||
|
||||
FormatLocaleString(buffer,MaxTextExtent,"%.20g",(double) _xOff);
|
||||
geometry+=buffer;
|
||||
|
||||
if (_yNegative)
|
||||
geometry+='-';
|
||||
else
|
||||
geometry+='+';
|
||||
|
||||
FormatLocaleString(buffer,MaxTextExtent,"%.20g",(double) _yOff);
|
||||
geometry+=buffer;
|
||||
}
|
||||
|
||||
if (_percent)
|
||||
geometry+='%';
|
||||
|
||||
if (_aspect)
|
||||
geometry+='!';
|
||||
|
||||
if (_greater)
|
||||
geometry+='>';
|
||||
|
||||
if (_less)
|
||||
geometry+='<';
|
||||
|
||||
if (_fillArea)
|
||||
geometry+='^';
|
||||
|
||||
if (_limitPixels)
|
||||
geometry+='@';
|
||||
|
||||
return(geometry);
|
||||
}
|
||||
|
||||
Magick::Geometry::Geometry(const MagickCore::RectangleInfo &rectangle_)
|
||||
: _width(static_cast<size_t>(rectangle_.width)),
|
||||
_height(static_cast<size_t>(rectangle_.height)),
|
||||
_xOff(static_cast<ssize_t>(rectangle_.x)),
|
||||
_yOff(static_cast<ssize_t>(rectangle_.y)),
|
||||
_xNegative(rectangle_.x < 0 ? true : false),
|
||||
_yNegative(rectangle_.y < 0 ? true : false),
|
||||
_isValid(true),
|
||||
_percent(false),
|
||||
_aspect(false),
|
||||
_greater(false),
|
||||
_less(false),
|
||||
_fillArea(false),
|
||||
_limitPixels(false)
|
||||
{
|
||||
}
|
||||
|
||||
const Magick::Geometry& Magick::Geometry::operator=(
|
||||
const MagickCore::RectangleInfo &rectangle_)
|
||||
{
|
||||
_width=static_cast<size_t>(rectangle_.width),
|
||||
_height=static_cast<size_t>(rectangle_.height),
|
||||
_xOff=static_cast<ssize_t>(rectangle_.x),
|
||||
_yOff=static_cast<ssize_t>(rectangle_.y),
|
||||
_xNegative=rectangle_.x < 0 ? true : false,
|
||||
_yNegative=rectangle_.y < 0 ? true : false,
|
||||
_isValid=true;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::Geometry::operator MagickCore::RectangleInfo() const
|
||||
{
|
||||
RectangleInfo rectangle;
|
||||
rectangle.width=_width;
|
||||
rectangle.height=_height;
|
||||
rectangle.x=_xOff;
|
||||
rectangle.y=_yOff;
|
||||
return(rectangle);
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator == (const Magick::Offset& left_,
|
||||
const Magick::Offset& right_)
|
||||
{
|
||||
return((left_.x() == right_.x()) &&
|
||||
(left_.y() == right_.y()));
|
||||
}
|
||||
|
||||
MagickPPExport int Magick::operator != (const Magick::Offset& left_,
|
||||
const Magick::Offset& right_)
|
||||
{
|
||||
return(!(left_ == right_));
|
||||
}
|
||||
|
||||
Magick::Offset::Offset(void)
|
||||
: _x(0),
|
||||
_y(0)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Offset::Offset(const char *offset_)
|
||||
: _x(0),
|
||||
_y(0)
|
||||
{
|
||||
*this=offset_; // Use assignment operator
|
||||
}
|
||||
|
||||
Magick::Offset::Offset(const Offset &offset_)
|
||||
: _x(offset_._x),
|
||||
_y(offset_._y)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Offset::Offset(const std::string &offset_)
|
||||
: _x(0),
|
||||
_y(0)
|
||||
{
|
||||
*this=offset_; // Use assignment operator
|
||||
}
|
||||
|
||||
Magick::Offset::Offset(ssize_t x_,ssize_t y_)
|
||||
: _x(x_),
|
||||
_y(y_)
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Offset::~Offset(void)
|
||||
{
|
||||
}
|
||||
|
||||
const Magick::Offset& Magick::Offset::operator=(const char *offset_)
|
||||
{
|
||||
MagickCore::GeometryInfo
|
||||
geometry_info;
|
||||
|
||||
MagickCore::MagickStatusType
|
||||
flags;
|
||||
|
||||
flags=ParseGeometry(offset_,&geometry_info);
|
||||
_x=(ssize_t) geometry_info.rho;
|
||||
_y=(ssize_t) geometry_info.sigma;
|
||||
if ((flags & MagickCore::SigmaValue) == 0)
|
||||
_y=_x;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
Magick::Offset& Magick::Offset::operator=(const Offset &offset_)
|
||||
{
|
||||
// If not being set to ourself
|
||||
if (this != &offset_)
|
||||
{
|
||||
_x=offset_._x;
|
||||
_y=offset_._y;
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
const Magick::Offset& Magick::Offset::operator=(const std::string &offset_)
|
||||
{
|
||||
*this=offset_.c_str();
|
||||
return(*this);
|
||||
}
|
||||
|
||||
ssize_t Magick::Offset::x(void) const
|
||||
{
|
||||
return(_x);
|
||||
}
|
||||
|
||||
ssize_t Magick::Offset::y(void) const
|
||||
{
|
||||
return(_y);
|
||||
}
|
||||
|
||||
Magick::Offset::operator MagickCore::OffsetInfo() const
|
||||
{
|
||||
OffsetInfo offset;
|
||||
offset.x=_x;
|
||||
offset.y=_y;
|
||||
return(offset);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@/ImageMagick-@MAGICK_MAJOR_VERSION@
|
||||
includearchdir=@INCLUDEARCH_DIR@/ImageMagick-@MAGICK_MAJOR_VERSION@
|
||||
libname=Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
|
||||
Name: ImageMagick++
|
||||
Description: Magick++ - C++ API for ImageMagick (ABI @MAGICK_ABI_SUFFIX@)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: MagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
Libs: -L${libdir} -l${libname}
|
||||
Libs.private: -L${libdir} -l${libname} @MAGICK_LIBS@ @MATH_LIBS@
|
||||
Cflags: -I${includearchdir} -I${includedir} @MAGICK_PCFLAGS@
|
@ -1,70 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2015
|
||||
//
|
||||
// Implementation of ImageRef
|
||||
//
|
||||
// This is an internal implementation class.
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/ImageRef.h"
|
||||
#include "Magick++/Exception.h"
|
||||
#include "Magick++/Options.h"
|
||||
|
||||
Magick::ImageRef::ImageRef(void)
|
||||
: _image(0),
|
||||
_options(new Options),
|
||||
_refCount(1),
|
||||
_mutexLock()
|
||||
{
|
||||
_image=AcquireImage(_options->imageInfo());
|
||||
throwException(&_image->exception);
|
||||
}
|
||||
|
||||
Magick::ImageRef::ImageRef(MagickCore::Image *image_)
|
||||
: _image(image_),
|
||||
_options(new Options),
|
||||
_refCount(1),
|
||||
_mutexLock()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::ImageRef::ImageRef(MagickCore::Image *image_,const Options *options_)
|
||||
: _image(image_),
|
||||
_options(0),
|
||||
_refCount(1),
|
||||
_mutexLock()
|
||||
{
|
||||
_options=new Options(*options_);
|
||||
}
|
||||
|
||||
Magick::ImageRef::~ImageRef(void)
|
||||
{
|
||||
// Deallocate image
|
||||
if (_image != (MagickCore::Image*) NULL)
|
||||
{
|
||||
DestroyImageList(_image);
|
||||
_image=(MagickCore::Image*) NULL;
|
||||
}
|
||||
|
||||
// Deallocate image options
|
||||
delete _options;
|
||||
_options=(Options *) NULL;
|
||||
}
|
||||
|
||||
void Magick::ImageRef::image(MagickCore::Image * image_)
|
||||
{
|
||||
if (_image != (MagickCore::Image*) NULL)
|
||||
DestroyImageList(_image);
|
||||
_image=image_;
|
||||
}
|
||||
|
||||
void Magick::ImageRef::options(Magick::Options *options_)
|
||||
{
|
||||
delete _options;
|
||||
_options=options_;
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Simplified includes for Magick++.
|
||||
// Inclusion of this header is sufficient to use all Magick++ APIs.
|
||||
//
|
||||
#ifndef MagickPlusPlus_Header
|
||||
#include <Magick++/Include.h>
|
||||
#include <Magick++/Functions.h>
|
||||
#include <Magick++/Image.h>
|
||||
#include <Magick++/Pixels.h>
|
||||
#include <Magick++/ResourceLimits.h>
|
||||
#include <Magick++/STL.h>
|
||||
|
||||
// Don't leak our definition of the 'restrict' keyword. 'restrict' is a valid
|
||||
// identifier in C++, and leaking it could cause extraneous build failures.
|
||||
#ifdef restrict
|
||||
#undef restrict
|
||||
#endif
|
||||
#define MagickPlusPlus_Header
|
||||
#endif // MagickPlusPlus_Header
|
@ -1,14 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@/ImageMagick-@MAGICK_MAJOR_VERSION@
|
||||
includearchdir=@INCLUDEARCH_DIR@/ImageMagick-@MAGICK_MAJOR_VERSION@
|
||||
libname=Magick++-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
|
||||
Name: Magick++
|
||||
Description: Magick++ - C++ API for ImageMagick (ABI @MAGICK_ABI_SUFFIX@)
|
||||
Version: @PACKAGE_BASE_VERSION@
|
||||
Requires: MagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
|
||||
Libs: -L${libdir} -l${libname}
|
||||
Libs.private: -L${libdir} -l${libname} @MAGICK_LIBS@ @MATH_LIBS@
|
||||
Cflags: -I${includearchdir} -I${includedir} @MAGICK_PCFLAGS@
|
@ -1,80 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2015
|
||||
//
|
||||
// Reference counted container class for Binary Large Objects (BLOBs)
|
||||
//
|
||||
|
||||
#if !defined(Magick_BlobRef_header)
|
||||
#define Magick_BlobRef_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
// Forward decl
|
||||
class BlobRef;
|
||||
|
||||
class MagickPPExport Blob
|
||||
{
|
||||
public:
|
||||
|
||||
enum Allocator
|
||||
{
|
||||
MallocAllocator,
|
||||
NewAllocator
|
||||
};
|
||||
|
||||
// Default constructor
|
||||
Blob(void);
|
||||
|
||||
// Construct object with data, making a copy of the supplied data.
|
||||
Blob(const void* data_,const size_t length_);
|
||||
|
||||
// Copy constructor (reference counted)
|
||||
Blob(const Blob& blob_);
|
||||
|
||||
// Destructor (reference counted)
|
||||
virtual ~Blob();
|
||||
|
||||
// Assignment operator (reference counted)
|
||||
Blob& operator=(const Blob& blob_ );
|
||||
|
||||
// Update object contents from Base64-encoded string representation.
|
||||
void base64(const std::string base64_);
|
||||
// Return Base64-encoded string representation.
|
||||
std::string base64(void);
|
||||
|
||||
// Obtain pointer to data. The user should never try to modify or
|
||||
// free this data since the Blob class manages its own data. The
|
||||
// user must be finished with the data before allowing the Blob to
|
||||
// be destroyed since the pointer is invalid once the Blob is
|
||||
// destroyed.
|
||||
const void* data(void) const;
|
||||
|
||||
// Obtain data length
|
||||
size_t length(void) const;
|
||||
|
||||
// Update object contents, making a copy of the supplied data.
|
||||
// Any existing data in the object is deallocated.
|
||||
void update(const void* data_,const size_t length_);
|
||||
|
||||
// Update object contents, using supplied pointer directly (no
|
||||
// copy). Any existing data in the object is deallocated. The user
|
||||
// must ensure that the pointer supplied is not deleted or
|
||||
// otherwise modified after it has been supplied to this method.
|
||||
// Specify allocator_ as "MallocAllocator" if memory is allocated
|
||||
// via the C language malloc() function, or "NewAllocator" if
|
||||
// memory is allocated via C++ 'new'.
|
||||
void updateNoCopy(void* data_,const size_t length_,
|
||||
Allocator allocator_=NewAllocator);
|
||||
|
||||
private:
|
||||
BlobRef *_blobRef;
|
||||
};
|
||||
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_BlobRef_header
|
@ -1,44 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2015
|
||||
//
|
||||
// Blob reference class
|
||||
//
|
||||
// This is an internal implementation class that should not be
|
||||
// accessed by users.
|
||||
//
|
||||
|
||||
#if !defined(Magick_Blob_header)
|
||||
#define Magick_Blob_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/Thread.h"
|
||||
#include "Magick++/Blob.h"
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class BlobRef
|
||||
{
|
||||
public:
|
||||
// Construct with data, making private copy of data
|
||||
BlobRef(const void* data_,const size_t length_);
|
||||
|
||||
// Destructor (actually destroys data)
|
||||
~BlobRef(void);
|
||||
|
||||
void* _data; // Blob data
|
||||
size_t _length; // Blob length
|
||||
Blob::Allocator _allocator; // Memory allocation system in use
|
||||
::ssize_t _refCount; // Reference count
|
||||
MutexLock _mutexLock; // Mutex lock
|
||||
|
||||
private:
|
||||
// Copy constructor and assignment are not supported
|
||||
BlobRef(const BlobRef&);
|
||||
BlobRef& operator=(const BlobRef&);
|
||||
};
|
||||
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_Blob_header
|
@ -1,103 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Dirk Lemstra 2014-2015
|
||||
//
|
||||
// Definition of channel moments.
|
||||
//
|
||||
|
||||
#if !defined (Magick_ChannelMoments_header)
|
||||
#define Magick_ChannelMoments_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <vector>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class Image;
|
||||
|
||||
class MagickPPExport ChannelMoments
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ChannelMoments(void);
|
||||
|
||||
// Copy constructor
|
||||
ChannelMoments(const ChannelMoments &channelMoments_);
|
||||
|
||||
// Destroy channel moments
|
||||
~ChannelMoments(void);
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
|
||||
ChannelMoments(const ChannelType channel_,
|
||||
const MagickCore::ChannelMoments *channelMoments_);
|
||||
|
||||
// X position of centroid
|
||||
double centroidX(void) const;
|
||||
|
||||
// Y position of centroid
|
||||
double centroidY(void) const;
|
||||
|
||||
// The channel
|
||||
ChannelType channel(void) const;
|
||||
|
||||
// X position of ellipse axis
|
||||
double ellipseAxisX(void) const;
|
||||
|
||||
// Y position of ellipse axis
|
||||
double ellipseAxisY(void) const;
|
||||
|
||||
// Ellipse angle
|
||||
double ellipseAngle(void) const;
|
||||
|
||||
// Ellipse eccentricity
|
||||
double ellipseEccentricity(void) const;
|
||||
|
||||
// Ellipse intensity
|
||||
double ellipseIntensity(void) const;
|
||||
|
||||
// Hu invariants (valid range for index is 0-7)
|
||||
double huInvariants(const size_t index_) const;
|
||||
|
||||
private:
|
||||
std::vector<double> _huInvariants;
|
||||
ChannelType _channel;
|
||||
double _centroidX;
|
||||
double _centroidY;
|
||||
double _ellipseAxisX;
|
||||
double _ellipseAxisY;
|
||||
double _ellipseAngle;
|
||||
double _ellipseEccentricity;
|
||||
double _ellipseIntensity;
|
||||
};
|
||||
|
||||
class MagickPPExport ImageMoments
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ImageMoments(void);
|
||||
|
||||
// Copy constructor
|
||||
ImageMoments(const ImageMoments &imageMoments_);
|
||||
|
||||
// Destroy image moments
|
||||
~ImageMoments(void);
|
||||
|
||||
// Returns the moments for the specified channel
|
||||
ChannelMoments channel(const ChannelType channel_=CompositeChannels) const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
ImageMoments(const Image &image_);
|
||||
|
||||
private:
|
||||
std::vector<ChannelMoments> _channels;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // Magick_ChannelMoments_header
|
@ -1,81 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2013-2014
|
||||
//
|
||||
// CoderInfo Definition
|
||||
//
|
||||
// Container for image format support information.
|
||||
//
|
||||
|
||||
#if !defined (Magick_CoderInfo_header)
|
||||
#define Magick_CoderInfo_header 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport CoderInfo
|
||||
{
|
||||
public:
|
||||
|
||||
enum MatchType {
|
||||
AnyMatch, // match any coder
|
||||
TrueMatch, // match coder if true
|
||||
FalseMatch // match coder if false
|
||||
};
|
||||
|
||||
// Default constructor
|
||||
CoderInfo(void);
|
||||
|
||||
// Copy constructor
|
||||
CoderInfo(const CoderInfo &coder_);
|
||||
|
||||
// Construct with coder name
|
||||
CoderInfo(const std::string &name_);
|
||||
|
||||
// Destructor
|
||||
~CoderInfo(void);
|
||||
|
||||
// Assignment operator
|
||||
CoderInfo& operator=(const CoderInfo &coder_);
|
||||
|
||||
// Format description
|
||||
std::string description(void) const;
|
||||
|
||||
// Format supports multiple frames
|
||||
bool isMultiFrame(void) const;
|
||||
|
||||
// Format is readable
|
||||
bool isReadable(void) const;
|
||||
|
||||
// Format is writeable
|
||||
bool isWritable(void) const;
|
||||
|
||||
// Format mime type
|
||||
std::string mimeType(void) const;
|
||||
|
||||
// Format name
|
||||
std::string name(void) const;
|
||||
|
||||
// Unregisters this coder
|
||||
bool unregister(void) const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
CoderInfo(const MagickCore::MagickInfo *magickInfo_);
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
std::string _description;
|
||||
std::string _mimeType;
|
||||
bool _isReadable;
|
||||
bool _isWritable;
|
||||
bool _isMultiFrame;
|
||||
};
|
||||
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_CoderInfo_header
|
@ -1,524 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003, 2008
|
||||
//
|
||||
// Color Implementation
|
||||
//
|
||||
#if !defined (Magick_Color_header)
|
||||
#define Magick_Color_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport Color;
|
||||
|
||||
// Compare two Color objects regardless of LHS/RHS
|
||||
MagickPPExport int operator ==
|
||||
(const Magick::Color &left_,const Magick::Color &right_);
|
||||
MagickPPExport int operator !=
|
||||
(const Magick::Color &left_,const Magick::Color &right_);
|
||||
MagickPPExport int operator >
|
||||
(const Magick::Color &left_,const Magick::Color &right_);
|
||||
MagickPPExport int operator <
|
||||
(const Magick::Color &left_,const Magick::Color &right_);
|
||||
MagickPPExport int operator >=
|
||||
(const Magick::Color &left_,const Magick::Color &right_);
|
||||
MagickPPExport int operator <=
|
||||
(const Magick::Color &left_,const Magick::Color &right_);
|
||||
|
||||
// Base color class stores RGB components scaled to fit Quantum
|
||||
class MagickPPExport Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
Color(void);
|
||||
|
||||
// Construct Color using the specified RGB values
|
||||
Color(Magick::Quantum red_,Magick::Quantum green_,Magick::Quantum blue_);
|
||||
|
||||
// Construct Color using the specified RGBA values
|
||||
Color(Magick::Quantum red_,Magick::Quantum green_,Magick::Quantum blue_,Magick::Quantum alpha_);
|
||||
|
||||
// Construct Color using the specified color string
|
||||
Color(const char *x11color_);
|
||||
|
||||
// Copy constructor
|
||||
Color(const Color &color_);
|
||||
|
||||
// Construct color via ImageMagick PixelPacket
|
||||
Color(const PixelPacket &color_);
|
||||
|
||||
// Constructor Color using the specified color string
|
||||
Color(const std::string &x11color_);
|
||||
|
||||
// Destructor
|
||||
virtual ~Color(void);
|
||||
|
||||
// Assignment operator
|
||||
Color& operator=(const Color& color_);
|
||||
|
||||
// Set color via X11 color specification string
|
||||
const Color& operator=(const char *x11color);
|
||||
|
||||
// Set color via X11 color specification string
|
||||
const Color& operator=(const std::string &x11color_);
|
||||
|
||||
// Set color via ImageMagick PixelPacket
|
||||
const Color& operator=(const PixelPacket &color_);
|
||||
|
||||
// Return ImageMagick PixelPacket
|
||||
operator PixelPacket() const;
|
||||
|
||||
// Return X11 color specification string
|
||||
operator std::string() const;
|
||||
|
||||
// Scaled (to 1.0) version of alpha for use in sub-classes
|
||||
// (range opaque=0 to transparent=1.0)
|
||||
void alpha(double alpha_);
|
||||
double alpha(void) const;
|
||||
|
||||
// Alpha level (range OpaqueOpacity=0 to TransparentOpacity=QuantumRange)
|
||||
void alphaQuantum(Quantum alpha_);
|
||||
Quantum alphaQuantum(void) const;
|
||||
|
||||
// Blue color (range 0 to QuantumRange)
|
||||
void blueQuantum(Quantum blue_);
|
||||
Quantum blueQuantum (void) const;
|
||||
|
||||
// Green color (range 0 to QuantumRange)
|
||||
void greenQuantum(Quantum green_);
|
||||
Quantum greenQuantum(void) const;
|
||||
|
||||
// Does object contain valid color?
|
||||
void isValid(bool valid_);
|
||||
bool isValid(void) const;
|
||||
|
||||
// Red color (range 0 to QuantumRange)
|
||||
void redQuantum(Quantum red_);
|
||||
Quantum redQuantum (void) const;
|
||||
|
||||
//
|
||||
// Public methods beyond this point are for Magick++ use only.
|
||||
//
|
||||
|
||||
// Obtain pixel intensity as a double
|
||||
double intensity(void) const
|
||||
{
|
||||
return (0.299*(_pixel->red)+0.587*(_pixel->green)+0.114*(_pixel->blue));
|
||||
}
|
||||
|
||||
// Scale a value expressed as a double (0-1) to Quantum range (0-QuantumRange)
|
||||
static Quantum scaleDoubleToQuantum(const double double_)
|
||||
{
|
||||
return (static_cast<Magick::Quantum>(double_*QuantumRange));
|
||||
}
|
||||
|
||||
// Scale a value expressed as a Quantum (0-QuantumRange) to double range (0-1)
|
||||
#if (MAGICKCORE_QUANTUM_DEPTH < 32) && (MAGICKCORE_SIZEOF_FLOAT_T != MAGICKCORE_SIZEOF_DOUBLE || !defined(MAGICKCORE_HDRI_SUPPORT))
|
||||
static double scaleQuantumToDouble(const Quantum quantum_)
|
||||
{
|
||||
return (static_cast<double>(quantum_)/QuantumRange);
|
||||
}
|
||||
#else
|
||||
static double scaleQuantumToDouble(const double quantum_)
|
||||
{
|
||||
return (quantum_/QuantumRange);
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// PixelType specifies the interpretation of PixelPacket members
|
||||
// RGBPixel:
|
||||
// Red = red;
|
||||
// Green = green;
|
||||
// Blue = blue;
|
||||
// RGBAPixel:
|
||||
// Red = red;
|
||||
// Green = green;
|
||||
// Blue = blue;
|
||||
// Alpha = opacity;
|
||||
// CYMKPixel:
|
||||
// Cyan = red
|
||||
// Yellow = green
|
||||
// Magenta = blue
|
||||
// Black(K) = opacity
|
||||
enum PixelType
|
||||
{
|
||||
RGBPixel,
|
||||
RGBAPixel,
|
||||
CYMKPixel
|
||||
};
|
||||
|
||||
// Constructor to construct with PixelPacket*
|
||||
// Used to point Color at a pixel in an image
|
||||
Color(PixelPacket *rep_,PixelType pixelType_);
|
||||
|
||||
// Set pixel
|
||||
// Used to point Color at a pixel in an image
|
||||
void pixel(PixelPacket *rep_,PixelType pixelType_);
|
||||
|
||||
// PixelPacket represents a color pixel:
|
||||
// red = red (range 0 to QuantumRange)
|
||||
// green = green (range 0 to QuantumRange)
|
||||
// blue = blue (range 0 to QuantumRange)
|
||||
// opacity = alpha (range OpaqueOpacity=0 to TransparentOpacity=QuantumRange)
|
||||
// index = PseudoColor colormap index
|
||||
PixelPacket *_pixel;
|
||||
|
||||
private:
|
||||
|
||||
bool _isValid; // Set true if pixel is "valid"
|
||||
bool _pixelOwn; // Set true if we allocated pixel
|
||||
PixelType _pixelType; // Color type supported by _pixel
|
||||
|
||||
// Common initializer for PixelPacket representation
|
||||
void initPixel();
|
||||
};
|
||||
|
||||
//
|
||||
// Grayscale RGB color
|
||||
//
|
||||
// Grayscale is simply RGB with equal parts of red, green, and blue
|
||||
// All double arguments have a valid range of 0.0 - 1.0.
|
||||
class MagickPPExport ColorGray : public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorGray(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorGray(const Color & color_);
|
||||
|
||||
// Construct ColorGray using the specified shade
|
||||
ColorGray(double shade_);
|
||||
|
||||
// Destructor
|
||||
~ColorGray();
|
||||
|
||||
void shade(double shade_);
|
||||
double shade(void) const;
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorGray& operator=(const Color& color_);
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelPacket*
|
||||
ColorGray(PixelPacket *rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
//
|
||||
// HSL Colorspace colors
|
||||
//
|
||||
class MagickPPExport ColorHSL: public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorHSL(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorHSL(const Color &color_);
|
||||
|
||||
// Construct ColorHSL using the specified HSL values
|
||||
ColorHSL(double hue_,double saturation_,double luminosity_);
|
||||
|
||||
// Destructor
|
||||
~ColorHSL();
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorHSL& operator=(const Color& color_);
|
||||
|
||||
// Hue color
|
||||
void hue(double hue_);
|
||||
double hue(void) const;
|
||||
|
||||
// Luminosity color
|
||||
void luminosity(double luminosity_);
|
||||
double luminosity(void) const;
|
||||
|
||||
// Saturation color
|
||||
void saturation(double saturation_);
|
||||
double saturation(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelPacket*
|
||||
ColorHSL(PixelPacket *rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
//
|
||||
// Monochrome color
|
||||
//
|
||||
// Color arguments are constrained to 'false' (black pixel) and 'true'
|
||||
// (white pixel)
|
||||
class MagickPPExport ColorMono : public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorMono(void);
|
||||
|
||||
// Construct ColorMono (false=black, true=white)
|
||||
ColorMono(bool mono_);
|
||||
|
||||
// Copy constructor
|
||||
ColorMono(const Color & color_);
|
||||
|
||||
// Destructor
|
||||
~ColorMono();
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorMono& operator=(const Color& color_);
|
||||
|
||||
// Mono color
|
||||
void mono(bool mono_);
|
||||
bool mono(void) const;
|
||||
|
||||
protected:
|
||||
// Constructor to construct with PixelPacket*
|
||||
ColorMono(PixelPacket *rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
//
|
||||
// RGB color
|
||||
//
|
||||
// All color arguments have a valid range of 0.0 - 1.0.
|
||||
class MagickPPExport ColorRGB: public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorRGB(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorRGB(const Color &color_);
|
||||
|
||||
// Construct ColorRGB using the specified RGB values
|
||||
ColorRGB(double red_,double green_,double blue_);
|
||||
|
||||
// Destructor
|
||||
~ColorRGB(void);
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorRGB& operator=(const Color& color_);
|
||||
|
||||
// Blue color
|
||||
void blue(double blue_);
|
||||
double blue(void) const;
|
||||
|
||||
// Green color
|
||||
void green(double green_);
|
||||
double green(void) const;
|
||||
|
||||
// Red color
|
||||
void red(double red_);
|
||||
double red(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelPacket*
|
||||
ColorRGB(PixelPacket *rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
//
|
||||
// YUV Colorspace color
|
||||
//
|
||||
// Argument ranges:
|
||||
// Y: 0.0 through 1.0
|
||||
// U: -0.5 through 0.5
|
||||
// V: -0.5 through 0.5
|
||||
class MagickPPExport ColorYUV: public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorYUV(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorYUV(const Color &color_);
|
||||
|
||||
// Construct ColorYUV using the specified YUV values
|
||||
ColorYUV(double y_,double u_,double v_);
|
||||
|
||||
// Destructor
|
||||
~ColorYUV(void);
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorYUV& operator=(const Color& color_);
|
||||
|
||||
// Color U (0.0 through 1.0)
|
||||
void u(double u_);
|
||||
double u(void) const;
|
||||
|
||||
// Color V (-0.5 through 0.5)
|
||||
void v(double v_);
|
||||
double v(void) const;
|
||||
|
||||
// Color Y (-0.5 through 0.5)
|
||||
void y(double y_);
|
||||
double y(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorYUV(PixelPacket *rep_,PixelType pixelType_);
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
//
|
||||
// Inlines
|
||||
//
|
||||
|
||||
//
|
||||
// Color
|
||||
//
|
||||
|
||||
inline void Magick::Color::alpha(double alpha_)
|
||||
{
|
||||
alphaQuantum(scaleDoubleToQuantum(alpha_));
|
||||
}
|
||||
inline double Magick::Color::alpha(void) const
|
||||
{
|
||||
return scaleQuantumToDouble(alphaQuantum());
|
||||
}
|
||||
|
||||
inline void Magick::Color::alphaQuantum(Magick::Quantum alpha_)
|
||||
{
|
||||
_pixel->opacity=alpha_;
|
||||
_isValid=true ;
|
||||
}
|
||||
|
||||
inline Magick::Quantum Magick::Color::alphaQuantum(void) const
|
||||
{
|
||||
return _pixel->opacity;
|
||||
}
|
||||
|
||||
inline void Magick::Color::blueQuantum(Magick::Quantum blue_)
|
||||
{
|
||||
_pixel->blue=blue_;
|
||||
_isValid=true;
|
||||
}
|
||||
|
||||
inline Magick::Quantum Magick::Color::blueQuantum(void) const
|
||||
{
|
||||
return _pixel->blue;
|
||||
}
|
||||
|
||||
inline void Magick::Color::greenQuantum(Magick::Quantum green_)
|
||||
{
|
||||
_pixel->green=green_;
|
||||
_isValid=true;
|
||||
}
|
||||
|
||||
inline Magick::Quantum Magick::Color::greenQuantum(void) const
|
||||
{
|
||||
return _pixel->green;
|
||||
}
|
||||
|
||||
inline void Magick::Color::redQuantum(Magick::Quantum red_)
|
||||
{
|
||||
_pixel->red=red_;
|
||||
_isValid=true;
|
||||
}
|
||||
|
||||
inline Magick::Quantum Magick::Color::redQuantum(void) const
|
||||
{
|
||||
return _pixel->red;
|
||||
}
|
||||
|
||||
inline void Magick::Color::initPixel()
|
||||
{
|
||||
_pixel->red=0;
|
||||
_pixel->green=0;
|
||||
_pixel->blue=0;
|
||||
_pixel->opacity=TransparentOpacity;
|
||||
}
|
||||
|
||||
inline Magick::Color::operator MagickCore::PixelPacket() const
|
||||
{
|
||||
return *_pixel;
|
||||
}
|
||||
|
||||
//
|
||||
// ColorGray
|
||||
//
|
||||
inline Magick::ColorGray::ColorGray(Magick::PixelPacket *rep_,
|
||||
Magick::Color::PixelType pixelType_)
|
||||
: Color(rep_,pixelType_)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// ColorHSL
|
||||
//
|
||||
inline Magick::ColorHSL::ColorHSL(Magick::PixelPacket *rep_,
|
||||
Magick::Color::PixelType pixelType_)
|
||||
: Color(rep_,pixelType_)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// ColorMono
|
||||
//
|
||||
inline Magick::ColorMono::ColorMono(Magick::PixelPacket *rep_,
|
||||
Magick::Color::PixelType pixelType_)
|
||||
: Color(rep_,pixelType_)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// ColorRGB
|
||||
//
|
||||
inline Magick::ColorRGB::ColorRGB(Magick::PixelPacket *rep_,
|
||||
Magick::Color::PixelType pixelType_)
|
||||
: Color(rep_,pixelType_)
|
||||
{
|
||||
}
|
||||
|
||||
inline void Magick::ColorRGB::blue(double blue_)
|
||||
{
|
||||
blueQuantum(scaleDoubleToQuantum(blue_));
|
||||
}
|
||||
|
||||
inline double Magick::ColorRGB::blue(void) const
|
||||
{
|
||||
return scaleQuantumToDouble(blueQuantum());
|
||||
}
|
||||
|
||||
inline void Magick::ColorRGB::green(double green_)
|
||||
{
|
||||
greenQuantum(scaleDoubleToQuantum(green_));
|
||||
}
|
||||
|
||||
inline double Magick::ColorRGB::green(void) const
|
||||
{
|
||||
return scaleQuantumToDouble(greenQuantum());
|
||||
}
|
||||
|
||||
inline void Magick::ColorRGB::red(double red_)
|
||||
{
|
||||
redQuantum(scaleDoubleToQuantum(red_));
|
||||
}
|
||||
|
||||
inline double Magick::ColorRGB::red(void) const
|
||||
{
|
||||
return scaleQuantumToDouble(redQuantum());
|
||||
}
|
||||
|
||||
//
|
||||
// ColorYUV
|
||||
//
|
||||
|
||||
inline Magick::ColorYUV::ColorYUV(Magick::PixelPacket *rep_,
|
||||
Magick::Color::PixelType pixelType_)
|
||||
: Color(rep_,pixelType_)
|
||||
{
|
||||
}
|
||||
|
||||
#endif // Magick_Color_header
|
File diff suppressed because it is too large
Load Diff
@ -1,425 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014-2015
|
||||
//
|
||||
// Definition of Magick::Exception and derived classes
|
||||
// Magick::Warning* and Magick::Error*. Derived from C++ STD
|
||||
// 'exception' class for convenience.
|
||||
//
|
||||
// These classes form part of the Magick++ user interface.
|
||||
//
|
||||
|
||||
#if !defined(Magick_Exception_header)
|
||||
#define Magick_Exception_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport Exception: public std::exception
|
||||
{
|
||||
public:
|
||||
|
||||
// Construct with message string
|
||||
Exception(const std::string& what_);
|
||||
|
||||
// Construct with message string and nested exception
|
||||
Exception(const std::string& what_, Exception* nested_);
|
||||
|
||||
// Copy constructor
|
||||
Exception(const Exception& original_);
|
||||
|
||||
// Destructor
|
||||
virtual ~Exception() throw();
|
||||
|
||||
// Assignment operator
|
||||
Exception& operator=(const Exception& original_);
|
||||
|
||||
// Get string identifying exception
|
||||
virtual const char* what() const throw();
|
||||
|
||||
// Get nested exception
|
||||
const Exception* nested() const throw();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// No user-serviceable parts beyond this point
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void nested(Exception* nested_) throw();
|
||||
|
||||
private:
|
||||
std::string _what;
|
||||
Exception* _nested;
|
||||
};
|
||||
|
||||
//
|
||||
// Error exceptions
|
||||
//
|
||||
|
||||
class MagickPPExport Error: public Exception
|
||||
{
|
||||
public:
|
||||
explicit Error(const std::string& what_);
|
||||
explicit Error(const std::string& what_,Exception *nested_);
|
||||
~Error() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorBlob: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorBlob(const std::string& what_);
|
||||
explicit ErrorBlob(const std::string& what_,Exception *nested_);
|
||||
~ErrorBlob() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorCache: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorCache(const std::string& what_);
|
||||
explicit ErrorCache(const std::string& what_,Exception *nested_);
|
||||
~ErrorCache() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorCoder: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorCoder(const std::string& what_);
|
||||
explicit ErrorCoder(const std::string& what_,Exception *nested_);
|
||||
~ErrorCoder() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorConfigure: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorConfigure(const std::string& what_);
|
||||
explicit ErrorConfigure(const std::string& what_,Exception *nested_);
|
||||
~ErrorConfigure() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorCorruptImage: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorCorruptImage(const std::string& what_);
|
||||
explicit ErrorCorruptImage(const std::string& what_,Exception *nested_);
|
||||
~ErrorCorruptImage() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorDelegate: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorDelegate(const std::string& what_);
|
||||
explicit ErrorDelegate(const std::string& what_,Exception *nested_);
|
||||
~ErrorDelegate() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorDraw: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorDraw(const std::string& what_);
|
||||
explicit ErrorDraw(const std::string& what_,Exception *nested_);
|
||||
~ErrorDraw() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorFileOpen: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorFileOpen(const std::string& what_);
|
||||
explicit ErrorFileOpen(const std::string& what_,Exception *nested_);
|
||||
~ErrorFileOpen() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorImage: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorImage(const std::string& what_);
|
||||
explicit ErrorImage(const std::string& what_,Exception *nested_);
|
||||
~ErrorImage() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorMissingDelegate: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorMissingDelegate(const std::string& what_);
|
||||
explicit ErrorMissingDelegate(const std::string& what_,Exception *nested_);
|
||||
~ErrorMissingDelegate() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorModule: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorModule(const std::string& what_);
|
||||
explicit ErrorModule(const std::string& what_,Exception *nested_);
|
||||
~ErrorModule() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorMonitor: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorMonitor(const std::string& what_);
|
||||
explicit ErrorMonitor(const std::string& what_,Exception *nested_);
|
||||
~ErrorMonitor() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorOption: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorOption(const std::string& what_);
|
||||
explicit ErrorOption(const std::string& what_,Exception *nested_);
|
||||
~ErrorOption() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorPolicy: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorPolicy(const std::string& what_);
|
||||
explicit ErrorPolicy(const std::string& what_,Exception *nested_);
|
||||
~ErrorPolicy() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorRegistry: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorRegistry(const std::string& what_);
|
||||
explicit ErrorRegistry(const std::string& what_,Exception *nested_);
|
||||
~ErrorRegistry() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorResourceLimit: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorResourceLimit(const std::string& what_);
|
||||
explicit ErrorResourceLimit(const std::string& what_,Exception *nested_);
|
||||
~ErrorResourceLimit() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorStream: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorStream(const std::string& what_);
|
||||
explicit ErrorStream(const std::string& what_,Exception *nested_);
|
||||
~ErrorStream() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorType: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorType(const std::string& what_);
|
||||
explicit ErrorType(const std::string& what_,Exception *nested_);
|
||||
~ErrorType() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorUndefined: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorUndefined(const std::string& what_);
|
||||
explicit ErrorUndefined(const std::string& what_,Exception *nested_);
|
||||
~ErrorUndefined() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport ErrorXServer: public Error
|
||||
{
|
||||
public:
|
||||
explicit ErrorXServer(const std::string& what_);
|
||||
explicit ErrorXServer(const std::string& what_,Exception *nested_);
|
||||
~ErrorXServer() throw();
|
||||
};
|
||||
|
||||
//
|
||||
// Warnings
|
||||
//
|
||||
|
||||
class MagickPPExport Warning: public Exception
|
||||
{
|
||||
public:
|
||||
explicit Warning(const std::string& what_);
|
||||
explicit Warning(const std::string& what_,Exception *nested_);
|
||||
~Warning() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningBlob: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningBlob(const std::string& what_);
|
||||
explicit WarningBlob(const std::string& what_,Exception *nested_);
|
||||
~WarningBlob() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningCache: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningCache(const std::string& what_);
|
||||
explicit WarningCache(const std::string& what_,Exception *nested_);
|
||||
~WarningCache() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningCoder: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningCoder(const std::string& what_);
|
||||
explicit WarningCoder(const std::string& what_,Exception *nested_);
|
||||
~WarningCoder() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningConfigure: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningConfigure(const std::string& what_);
|
||||
explicit WarningConfigure(const std::string& what_,Exception *nested_);
|
||||
~WarningConfigure() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningCorruptImage: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningCorruptImage(const std::string& what_);
|
||||
explicit WarningCorruptImage(const std::string& what_,Exception *nested_);
|
||||
~WarningCorruptImage() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningDelegate: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningDelegate(const std::string& what_);
|
||||
explicit WarningDelegate(const std::string& what_,Exception *nested_);
|
||||
~WarningDelegate() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningDraw : public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningDraw(const std::string& what_);
|
||||
explicit WarningDraw(const std::string& what_,Exception *nested_);
|
||||
~WarningDraw() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningFileOpen: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningFileOpen(const std::string& what_);
|
||||
explicit WarningFileOpen(const std::string& what_,Exception *nested_);
|
||||
~WarningFileOpen() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningImage: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningImage(const std::string& what_);
|
||||
explicit WarningImage(const std::string& what_,Exception *nested_);
|
||||
~WarningImage() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningMissingDelegate: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningMissingDelegate(const std::string& what_);
|
||||
explicit WarningMissingDelegate(const std::string& what_,
|
||||
Exception *nested_);
|
||||
~WarningMissingDelegate() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningModule: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningModule(const std::string& what_);
|
||||
explicit WarningModule(const std::string& what_,Exception *nested_);
|
||||
~WarningModule() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningMonitor: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningMonitor(const std::string& what_);
|
||||
explicit WarningMonitor(const std::string& what_,Exception *nested_);
|
||||
~WarningMonitor() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningOption: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningOption(const std::string& what_);
|
||||
explicit WarningOption(const std::string& what_,Exception *nested_);
|
||||
~WarningOption() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningPolicy: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningPolicy(const std::string& what_);
|
||||
explicit WarningPolicy(const std::string& what_,Exception *nested_);
|
||||
~WarningPolicy() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningRegistry: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningRegistry(const std::string& what_);
|
||||
explicit WarningRegistry(const std::string& what_,Exception *nested_);
|
||||
~WarningRegistry() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningResourceLimit: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningResourceLimit(const std::string& what_);
|
||||
explicit WarningResourceLimit(const std::string& what_,Exception *nested_);
|
||||
~WarningResourceLimit() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningStream: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningStream(const std::string& what_);
|
||||
explicit WarningStream(const std::string& what_,Exception *nested_);
|
||||
~WarningStream() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningType: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningType(const std::string& what_);
|
||||
explicit WarningType(const std::string& what_,Exception *nested_);
|
||||
~WarningType() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningUndefined: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningUndefined(const std::string& what_);
|
||||
explicit WarningUndefined(const std::string& what_,Exception *nested_);
|
||||
~WarningUndefined() throw();
|
||||
};
|
||||
|
||||
class MagickPPExport WarningXServer: public Warning
|
||||
{
|
||||
public:
|
||||
explicit WarningXServer(const std::string& what_);
|
||||
explicit WarningXServer(const std::string& what_,Exception *nested_);
|
||||
~WarningXServer() throw();
|
||||
};
|
||||
|
||||
//
|
||||
// No user-serviceable components beyond this point.
|
||||
//
|
||||
|
||||
std::string formatExceptionMessage(
|
||||
const MagickCore::ExceptionInfo *exception_);
|
||||
|
||||
Exception* createException(const MagickCore::ExceptionInfo *exception_);
|
||||
|
||||
// Throw exception based on raw data
|
||||
extern MagickPPExport void throwExceptionExplicit(
|
||||
const MagickCore::ExceptionType severity_,const char* reason_,
|
||||
const char* description_=(char *) NULL);
|
||||
|
||||
// Thow exception based on ImageMagick's ExceptionInfo
|
||||
extern MagickPPExport void throwException(
|
||||
MagickCore::ExceptionInfo *exception_,const bool quiet_=false);
|
||||
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_Exception_header
|
@ -1,37 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Simple C++ function wrappers for often used or otherwise
|
||||
// inconvenient ImageMagick equivalents
|
||||
//
|
||||
|
||||
#if !defined(Magick_Functions_header)
|
||||
#define Magick_Functions_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
// Clone C++ string as allocated C string, de-allocating any existing string
|
||||
MagickPPExport void CloneString(char **destination_,
|
||||
const std::string &source_);
|
||||
|
||||
// Disable OpenCL acceleration (only works when build with OpenCL support)
|
||||
MagickPPExport void DisableOpenCL(void);
|
||||
|
||||
// Enable OpenCL acceleration (only works when build with OpenCL support)
|
||||
MagickPPExport bool EnableOpenCL(const bool useCache_=true);
|
||||
|
||||
// C library initialization routine
|
||||
MagickPPExport void InitializeMagick(const char *path_);
|
||||
|
||||
// Seed a new sequence of pseudo-random numbers
|
||||
MagickPPExport void SetRandomSeed(const unsigned long seed);
|
||||
|
||||
// C library initialization routine
|
||||
MagickPPExport void TerminateMagick();
|
||||
}
|
||||
#endif // Magick_Functions_header
|
@ -1,344 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Geometry Definition
|
||||
//
|
||||
// Representation of an ImageMagick geometry specification
|
||||
// X11 geometry specification plus hints
|
||||
|
||||
#if !defined (Magick_Geometry_header)
|
||||
#define Magick_Geometry_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport Geometry;
|
||||
|
||||
// Compare two Geometry objects regardless of LHS/RHS
|
||||
MagickPPExport int operator ==
|
||||
(const Magick::Geometry& left_,const Magick::Geometry& right_);
|
||||
MagickPPExport int operator !=
|
||||
(const Magick::Geometry& left_,const Magick::Geometry& right_);
|
||||
MagickPPExport int operator >
|
||||
(const Magick::Geometry& left_,const Magick::Geometry& right_);
|
||||
MagickPPExport int operator <
|
||||
(const Magick::Geometry& left_,const Magick::Geometry& right_);
|
||||
MagickPPExport int operator >=
|
||||
(const Magick::Geometry& left_,const Magick::Geometry& right_);
|
||||
MagickPPExport int operator <=
|
||||
(const Magick::Geometry& left_,const Magick::Geometry& right_);
|
||||
|
||||
class MagickPPExport Geometry
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
Geometry();
|
||||
|
||||
// Construct Geometry from specified string
|
||||
Geometry(const char *geometry_);
|
||||
|
||||
// Copy constructor
|
||||
Geometry(const Geometry &geometry_);
|
||||
|
||||
// Construct Geometry from specified string
|
||||
Geometry(const std::string &geometry_);
|
||||
|
||||
// Construct Geometry from specified dimensions
|
||||
Geometry(size_t width_,size_t height_,::ssize_t xOff_=0,
|
||||
::ssize_t yOff_=0,bool xNegative_=false,bool yNegative_=false);
|
||||
|
||||
// Destructor
|
||||
~Geometry(void);
|
||||
|
||||
// Set via geometry string
|
||||
const Geometry& operator=(const char *geometry_);
|
||||
|
||||
// Assignment operator
|
||||
Geometry& operator=(const Geometry& Geometry_);
|
||||
|
||||
// Set via geometry string
|
||||
const Geometry& operator=(const std::string &geometry_ );
|
||||
|
||||
// Return geometry string
|
||||
operator std::string() const;
|
||||
|
||||
// Resize without preserving aspect ratio (!)
|
||||
void aspect(bool aspect_);
|
||||
bool aspect(void) const;
|
||||
|
||||
// Resize the image based on the smallest fitting dimension (^)
|
||||
void fillArea(bool fillArea_);
|
||||
bool fillArea(void) const;
|
||||
|
||||
// Resize if image is greater than size (>)
|
||||
void greater(bool greater_);
|
||||
bool greater(void) const;
|
||||
|
||||
// Height
|
||||
void height(size_t height_);
|
||||
size_t height(void) const;
|
||||
|
||||
// Does object contain valid geometry?
|
||||
void isValid(bool isValid_);
|
||||
bool isValid(void) const;
|
||||
|
||||
// Resize if image is less than size (<)
|
||||
void less(bool less_);
|
||||
bool less(void) const;
|
||||
|
||||
// Resize using a pixel area count limit (@)
|
||||
void limitPixels(bool limitPixels_);
|
||||
bool limitPixels(void) const;
|
||||
|
||||
// Width and height are expressed as percentages
|
||||
void percent(bool percent_);
|
||||
bool percent(void) const;
|
||||
|
||||
// Width
|
||||
void width(size_t width_);
|
||||
size_t width(void) const;
|
||||
|
||||
// Sign of X offset negative? (X origin at right)
|
||||
void xNegative(bool xNegative_);
|
||||
bool xNegative(void) const;
|
||||
|
||||
// X offset from origin
|
||||
void xOff(::ssize_t xOff_);
|
||||
::ssize_t xOff(void) const;
|
||||
|
||||
// Sign of Y offset negative? (Y origin at bottom)
|
||||
void yNegative(bool yNegative_);
|
||||
bool yNegative(void) const;
|
||||
|
||||
// Y offset from origin
|
||||
void yOff(::ssize_t yOff_);
|
||||
::ssize_t yOff(void) const;
|
||||
|
||||
//
|
||||
// Public methods below this point are for Magick++ use only.
|
||||
//
|
||||
|
||||
// Construct from RectangleInfo
|
||||
Geometry(const MagickCore::RectangleInfo &rectangle_);
|
||||
|
||||
// Set via RectangleInfo
|
||||
const Geometry& operator=(const MagickCore::RectangleInfo &rectangle_);
|
||||
|
||||
// Return an ImageMagick RectangleInfo struct
|
||||
operator MagickCore::RectangleInfo() const;
|
||||
|
||||
private:
|
||||
size_t _width;
|
||||
size_t _height;
|
||||
::ssize_t _xOff;
|
||||
::ssize_t _yOff;
|
||||
bool _xNegative;
|
||||
bool _yNegative;
|
||||
bool _isValid;
|
||||
bool _percent; // Interpret width & height as percentages (%)
|
||||
bool _aspect; // Force exact size (!)
|
||||
bool _greater; // Resize only if larger than geometry (>)
|
||||
bool _less; // Resize only if smaller than geometry (<)
|
||||
bool _fillArea; // Resize the image based on the smallest fitting dimension (^)
|
||||
bool _limitPixels; // Resize using a pixel area count limit (@)
|
||||
};
|
||||
|
||||
class MagickPPExport Offset;
|
||||
|
||||
// Compare two Offset objects
|
||||
MagickPPExport int operator ==
|
||||
(const Magick::Offset& left_,const Magick::Offset& right_);
|
||||
MagickPPExport int operator !=
|
||||
(const Magick::Offset& left_,const Magick::Offset& right_);
|
||||
|
||||
class MagickPPExport Offset
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
Offset();
|
||||
|
||||
// Construct Offset from specified string
|
||||
Offset(const char *offset_);
|
||||
|
||||
// Copy constructor
|
||||
Offset(const Offset &offset_);
|
||||
|
||||
// Construct Offset from specified string
|
||||
Offset(const std::string &offset_);
|
||||
|
||||
// Construct Offset from specified x and y
|
||||
Offset(ssize_t x_,ssize_t y_);
|
||||
|
||||
// Destructor
|
||||
~Offset(void);
|
||||
|
||||
// Set via offset string
|
||||
const Offset& operator=(const char *offset_);
|
||||
|
||||
// Assignment operator
|
||||
Offset& operator=(const Offset& offset_);
|
||||
|
||||
// Set via offset string
|
||||
const Offset& operator=(const std::string &offset_);
|
||||
|
||||
// X offset from origin
|
||||
ssize_t x(void) const;
|
||||
|
||||
// Y offset from origin
|
||||
ssize_t y(void) const;
|
||||
|
||||
//
|
||||
// Public methods below this point are for Magick++ use only.
|
||||
//
|
||||
|
||||
// Return an ImageMagick OffsetInfo struct
|
||||
operator MagickCore::OffsetInfo() const;
|
||||
|
||||
private:
|
||||
ssize_t _x;
|
||||
ssize_t _y;
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
//
|
||||
// Inlines
|
||||
//
|
||||
|
||||
inline void Magick::Geometry::aspect(bool aspect_)
|
||||
{
|
||||
_aspect=aspect_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::aspect(void) const
|
||||
{
|
||||
return(_aspect);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::fillArea(bool fillArea_)
|
||||
{
|
||||
_fillArea=fillArea_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::fillArea(void) const
|
||||
{
|
||||
return(_fillArea);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::greater(bool greater_)
|
||||
{
|
||||
_greater=greater_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::greater(void) const
|
||||
{
|
||||
return(_greater);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::height(size_t height_)
|
||||
{
|
||||
_height=height_;
|
||||
}
|
||||
|
||||
inline size_t Magick::Geometry::height(void) const
|
||||
{
|
||||
return(_height);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::isValid(bool isValid_)
|
||||
{
|
||||
_isValid=isValid_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::isValid(void) const
|
||||
{
|
||||
return(_isValid);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::less(bool less_)
|
||||
{
|
||||
_less=less_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::less(void) const
|
||||
{
|
||||
return(_less);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::limitPixels(bool limitPixels_)
|
||||
{
|
||||
_limitPixels=limitPixels_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::limitPixels(void) const
|
||||
{
|
||||
return(_limitPixels);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::width(size_t width_)
|
||||
{
|
||||
_width=width_;
|
||||
isValid(true);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::percent(bool percent_)
|
||||
{
|
||||
_percent = percent_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::percent(void) const
|
||||
{
|
||||
return(_percent);
|
||||
}
|
||||
|
||||
inline size_t Magick::Geometry::width(void) const
|
||||
{
|
||||
return(_width);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::xNegative(bool xNegative_)
|
||||
{
|
||||
_xNegative=xNegative_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::xNegative(void) const
|
||||
{
|
||||
return(_xNegative);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::xOff(::ssize_t xOff_)
|
||||
{
|
||||
_xOff=xOff_;
|
||||
}
|
||||
|
||||
inline ::ssize_t Magick::Geometry::xOff(void) const
|
||||
{
|
||||
return(_xOff);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::yNegative(bool yNegative_)
|
||||
{
|
||||
_yNegative=yNegative_;
|
||||
}
|
||||
|
||||
inline bool Magick::Geometry::yNegative(void) const
|
||||
{
|
||||
return(_yNegative);
|
||||
}
|
||||
|
||||
inline void Magick::Geometry::yOff(::ssize_t yOff_)
|
||||
{
|
||||
_yOff=yOff_;
|
||||
}
|
||||
|
||||
inline ::ssize_t Magick::Geometry::yOff(void) const
|
||||
{
|
||||
return(_yOff);
|
||||
}
|
||||
|
||||
#endif // Magick_Geometry_header
|
File diff suppressed because it is too large
Load Diff
@ -1,77 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2015
|
||||
//
|
||||
// Definition of an Image reference
|
||||
//
|
||||
// This is a private implementation class which should never be
|
||||
// referenced by any user code.
|
||||
//
|
||||
|
||||
#if !defined(Magick_ImageRef_header)
|
||||
#define Magick_ImageRef_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/Thread.h"
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class Options;
|
||||
|
||||
//
|
||||
// Reference counted access to Image *
|
||||
//
|
||||
class MagickPPExport ImageRef
|
||||
{
|
||||
friend class Image;
|
||||
|
||||
private:
|
||||
|
||||
// Construct with null image and default options
|
||||
ImageRef(void);
|
||||
|
||||
// Construct with an image pointer and default options
|
||||
ImageRef(MagickCore::Image *image_);
|
||||
|
||||
// Construct with an image pointer and options
|
||||
ImageRef(MagickCore::Image *image_,const Options *options_);
|
||||
|
||||
// Destroy image and options
|
||||
~ImageRef(void);
|
||||
|
||||
// Copy constructor and assignment are not supported
|
||||
ImageRef(const ImageRef&);
|
||||
ImageRef& operator=(const ImageRef&);
|
||||
|
||||
// Retrieve image from reference
|
||||
void image(MagickCore::Image *image_);
|
||||
MagickCore::Image *&image(void);
|
||||
|
||||
// Retrieve Options from reference
|
||||
void options(Options *options_);
|
||||
Options *options(void);
|
||||
|
||||
MagickCore::Image *_image; // ImageMagick Image
|
||||
Options *_options; // User-specified options
|
||||
::ssize_t _refCount; // Reference count
|
||||
MutexLock _mutexLock; // Mutex lock
|
||||
};
|
||||
|
||||
} // end of namespace Magick
|
||||
|
||||
//
|
||||
// Inlines
|
||||
//
|
||||
|
||||
inline MagickCore::Image *&Magick::ImageRef::image(void)
|
||||
{
|
||||
return(_image);
|
||||
}
|
||||
|
||||
inline Magick::Options *Magick::ImageRef::options(void)
|
||||
{
|
||||
return(_options);
|
||||
}
|
||||
|
||||
#endif // Magick_ImageRef_header
|
File diff suppressed because it is too large
Load Diff
@ -1,373 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
//
|
||||
// Definition of Montage class used to specify montage options.
|
||||
//
|
||||
|
||||
#if !defined(Magick_Montage_header)
|
||||
#define Magick_Montage_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
#include "Magick++/Color.h"
|
||||
#include "Magick++/Geometry.h"
|
||||
|
||||
//
|
||||
// Basic (Un-framed) Montage
|
||||
//
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport Montage
|
||||
{
|
||||
public:
|
||||
|
||||
Montage(void);
|
||||
virtual ~Montage(void);
|
||||
|
||||
// Color that thumbnails are composed on
|
||||
void backgroundColor(const Color &backgroundColor_);
|
||||
Color backgroundColor(void) const;
|
||||
|
||||
// Composition algorithm to use (e.g. ReplaceCompositeOp)
|
||||
void compose(CompositeOperator compose_);
|
||||
CompositeOperator compose(void) const;
|
||||
|
||||
// Filename to save montages to
|
||||
void fileName(const std::string &fileName_);
|
||||
std::string fileName(void) const;
|
||||
|
||||
// Fill color
|
||||
void fillColor(const Color &fill_);
|
||||
Color fillColor(void) const;
|
||||
|
||||
// Label font
|
||||
void font(const std::string &font_);
|
||||
std::string font(void) const;
|
||||
|
||||
// Thumbnail width & height plus border width & height
|
||||
void geometry(const Geometry &geometry_);
|
||||
Geometry geometry(void) const;
|
||||
|
||||
// Thumbnail position (e.g. SouthWestGravity)
|
||||
void gravity(GravityType gravity_);
|
||||
GravityType gravity(void) const;
|
||||
|
||||
// Thumbnail label (applied to image prior to montage)
|
||||
void label(const std::string &label_);
|
||||
std::string label(void) const;
|
||||
|
||||
// Same as fill color
|
||||
void penColor(const Color &pen_);
|
||||
Color penColor(void) const;
|
||||
|
||||
// Font point size
|
||||
void pointSize(size_t pointSize_);
|
||||
size_t pointSize(void) const;
|
||||
|
||||
// Enable drop-shadows on thumbnails
|
||||
void shadow(bool shadow_);
|
||||
bool shadow(void) const;
|
||||
|
||||
// Outline color
|
||||
void strokeColor(const Color &stroke_);
|
||||
Color strokeColor(void) const;
|
||||
|
||||
// Background texture image
|
||||
void texture(const std::string &texture_);
|
||||
std::string texture(void) const;
|
||||
|
||||
// Thumbnail rows and colmns
|
||||
void tile(const Geometry &tile_);
|
||||
Geometry tile(void) const;
|
||||
|
||||
// Montage title
|
||||
void title(const std::string &title_);
|
||||
std::string title(void) const;
|
||||
|
||||
// Transparent color
|
||||
void transparentColor(const Color &transparentColor_);
|
||||
Color transparentColor(void) const;
|
||||
|
||||
//
|
||||
// Implementation methods/members
|
||||
//
|
||||
|
||||
// Update elements in existing MontageInfo structure
|
||||
virtual void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const;
|
||||
|
||||
private:
|
||||
|
||||
Color _backgroundColor;
|
||||
CompositeOperator _compose;
|
||||
std::string _fileName;
|
||||
Color _fill;
|
||||
std::string _font;
|
||||
Geometry _geometry;
|
||||
GravityType _gravity;
|
||||
std::string _label;
|
||||
size_t _pointSize;
|
||||
bool _shadow;
|
||||
Color _stroke;
|
||||
std::string _texture;
|
||||
Geometry _tile;
|
||||
std::string _title;
|
||||
Color _transparentColor;
|
||||
};
|
||||
|
||||
//
|
||||
// Montage With Frames (Extends Basic Montage)
|
||||
//
|
||||
class MagickPPExport MontageFramed : public Montage
|
||||
{
|
||||
public:
|
||||
|
||||
MontageFramed(void);
|
||||
~MontageFramed(void);
|
||||
|
||||
// Frame border color
|
||||
void borderColor(const Color &borderColor_);
|
||||
Color borderColor(void) const;
|
||||
|
||||
// Pixels between thumbnail and surrounding frame
|
||||
void borderWidth(size_t borderWidth_);
|
||||
size_t borderWidth(void) const;
|
||||
|
||||
// Frame geometry (width & height frame thickness)
|
||||
void frameGeometry(const Geometry &frame_);
|
||||
Geometry frameGeometry(void) const;
|
||||
|
||||
// Frame foreground color
|
||||
void matteColor(const Color &matteColor_);
|
||||
Color matteColor(void) const;
|
||||
|
||||
//
|
||||
// Implementation methods/members
|
||||
//
|
||||
|
||||
// Update elements in existing MontageInfo structure
|
||||
void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const;
|
||||
|
||||
private:
|
||||
|
||||
Color _borderColor;
|
||||
size_t _borderWidth;
|
||||
Geometry _frame;
|
||||
Color _matteColor;
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
//
|
||||
// Inlines
|
||||
//
|
||||
|
||||
//
|
||||
// Implementation of Montage
|
||||
//
|
||||
|
||||
inline void Magick::Montage::backgroundColor(const Magick::Color &backgroundColor_)
|
||||
{
|
||||
_backgroundColor=backgroundColor_;
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::Montage::backgroundColor(void) const
|
||||
{
|
||||
return(_backgroundColor);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::compose(Magick::CompositeOperator compose_)
|
||||
{
|
||||
_compose=compose_;
|
||||
}
|
||||
|
||||
inline Magick::CompositeOperator Magick::Montage::compose(void) const
|
||||
{
|
||||
return(_compose);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::fileName(const std::string &fileName_)
|
||||
{
|
||||
_fileName=fileName_;
|
||||
}
|
||||
|
||||
inline std::string Magick::Montage::fileName(void) const
|
||||
{
|
||||
return(_fileName);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::fillColor(const Color &fill_)
|
||||
{
|
||||
_fill=fill_;
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::Montage::fillColor(void) const
|
||||
{
|
||||
return(_fill);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::font(const std::string &font_)
|
||||
{
|
||||
_font=font_;
|
||||
}
|
||||
|
||||
inline std::string Magick::Montage::font(void) const
|
||||
{
|
||||
return(_font);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::geometry(const Magick::Geometry &geometry_)
|
||||
{
|
||||
_geometry=geometry_;
|
||||
}
|
||||
|
||||
inline Magick::Geometry Magick::Montage::geometry(void) const
|
||||
{
|
||||
return(_geometry);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::gravity(Magick::GravityType gravity_)
|
||||
{
|
||||
_gravity=gravity_;
|
||||
}
|
||||
|
||||
inline Magick::GravityType Magick::Montage::gravity(void) const
|
||||
{
|
||||
return(_gravity);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::label(const std::string &label_)
|
||||
{
|
||||
_label=label_;
|
||||
}
|
||||
|
||||
inline std::string Magick::Montage::label(void) const
|
||||
{
|
||||
return(_label);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::penColor(const Color &pen_)
|
||||
{
|
||||
_fill=pen_;
|
||||
_stroke=Color("none");
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::Montage::penColor(void) const
|
||||
{
|
||||
return _fill;
|
||||
}
|
||||
|
||||
inline void Magick::Montage::pointSize(size_t pointSize_)
|
||||
{
|
||||
_pointSize=pointSize_;
|
||||
}
|
||||
|
||||
inline size_t Magick::Montage::pointSize(void) const
|
||||
{
|
||||
return(_pointSize);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::shadow(bool shadow_)
|
||||
{
|
||||
_shadow=shadow_;
|
||||
}
|
||||
|
||||
inline bool Magick::Montage::shadow(void) const
|
||||
{
|
||||
return(_shadow);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::strokeColor(const Color &stroke_)
|
||||
{
|
||||
_stroke=stroke_;
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::Montage::strokeColor(void) const
|
||||
{
|
||||
return(_stroke);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::texture(const std::string &texture_)
|
||||
{
|
||||
_texture=texture_;
|
||||
}
|
||||
|
||||
inline std::string Magick::Montage::texture(void) const
|
||||
{
|
||||
return(_texture);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::tile(const Geometry &tile_)
|
||||
{
|
||||
_tile=tile_;
|
||||
}
|
||||
|
||||
inline Magick::Geometry Magick::Montage::tile(void) const
|
||||
{
|
||||
return(_tile);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::title(const std::string &title_)
|
||||
{
|
||||
_title=title_;
|
||||
}
|
||||
|
||||
inline std::string Magick::Montage::title(void) const
|
||||
{
|
||||
return(_title);
|
||||
}
|
||||
|
||||
inline void Magick::Montage::transparentColor(const Magick::Color &transparentColor_)
|
||||
{
|
||||
_transparentColor=transparentColor_;
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::Montage::transparentColor(void) const
|
||||
{
|
||||
return(_transparentColor);
|
||||
}
|
||||
|
||||
//
|
||||
// Implementation of MontageFramed
|
||||
//
|
||||
|
||||
inline void Magick::MontageFramed::borderColor(const Magick::Color &borderColor_)
|
||||
{
|
||||
_borderColor=borderColor_;
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::MontageFramed::borderColor(void) const
|
||||
{
|
||||
return(_borderColor);
|
||||
}
|
||||
|
||||
inline void Magick::MontageFramed::borderWidth(size_t borderWidth_)
|
||||
{
|
||||
_borderWidth=borderWidth_;
|
||||
}
|
||||
|
||||
inline size_t Magick::MontageFramed::borderWidth(void) const
|
||||
{
|
||||
return(_borderWidth);
|
||||
}
|
||||
|
||||
inline void Magick::MontageFramed::frameGeometry(const Magick::Geometry &frame_)
|
||||
{
|
||||
_frame=frame_;
|
||||
}
|
||||
|
||||
inline Magick::Geometry Magick::MontageFramed::frameGeometry(void) const
|
||||
{
|
||||
return(_frame);
|
||||
}
|
||||
|
||||
inline void Magick::MontageFramed::matteColor(const Magick::Color &matteColor_)
|
||||
{
|
||||
_matteColor=matteColor_;
|
||||
}
|
||||
|
||||
inline Magick::Color Magick::MontageFramed::matteColor(void) const
|
||||
{
|
||||
return(_matteColor);
|
||||
}
|
||||
|
||||
#endif // Magick_Montage_header
|
@ -1,352 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014-2015
|
||||
//
|
||||
// Definition of Options
|
||||
//
|
||||
// Options which may be applied to an image. These options are the
|
||||
// equivalent of options supplied to ImageMagick utilities.
|
||||
//
|
||||
// This is an internal implementation class and is not part of the
|
||||
// Magick++ API
|
||||
//
|
||||
|
||||
#if !defined(Magick_Options_header)
|
||||
#define Magick_Options_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
#include "Magick++/Color.h"
|
||||
#include "Magick++/Geometry.h"
|
||||
#include "Magick++/Drawable.h"
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class Image;
|
||||
|
||||
class Options
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
Options(void);
|
||||
|
||||
// Copy constructor
|
||||
Options(const Options& options_);
|
||||
|
||||
// Destructor
|
||||
~Options();
|
||||
|
||||
// Remove pixel aliasing
|
||||
void antiAlias(bool flag_);
|
||||
bool antiAlias(void) const;
|
||||
|
||||
// Join images into a single multi-image file
|
||||
void adjoin(bool flag_);
|
||||
bool adjoin(void) const;
|
||||
|
||||
// Image background color
|
||||
void backgroundColor(const Color &color_);
|
||||
Color backgroundColor(void) const;
|
||||
|
||||
// Name of texture image to tile onto the image background
|
||||
void backgroundTexture(const std::string &backgroundTexture_);
|
||||
std::string backgroundTexture(void) const;
|
||||
|
||||
// Image border color
|
||||
void borderColor(const Color &color_);
|
||||
Color borderColor(void) const;
|
||||
|
||||
// Text bounding-box base color (default none)
|
||||
void boxColor(const Color &boxColor_);
|
||||
Color boxColor(void) const;
|
||||
|
||||
// Colors within this distance are considered equal
|
||||
void colorFuzz(double fuzz_);
|
||||
double colorFuzz(void) const;
|
||||
|
||||
// Image colorspace scheme
|
||||
void colorspaceType(ColorspaceType colorspace_);
|
||||
ColorspaceType colorspaceType(void) const;
|
||||
|
||||
// Compression type ( NoCompression, BZipCompression,
|
||||
// FaxCompression, JPEGCompression, LZWCompression,
|
||||
// RLECompression, or ZipCompression )
|
||||
void compressType(CompressionType compressType_);
|
||||
CompressionType compressType(void) const;
|
||||
|
||||
// Enable printing of debug messages from ImageMagick
|
||||
void debug(bool flag_);
|
||||
bool debug(void) const;
|
||||
|
||||
// Vertical and horizontal resolution in pixels of the image
|
||||
void density(const Geometry &geomery_);
|
||||
Geometry density(void) const;
|
||||
|
||||
// Image depth (8 or 16)
|
||||
void depth(size_t depth_);
|
||||
size_t depth(void) const;
|
||||
|
||||
// Endianness (little like Intel or big like SPARC) for image
|
||||
// formats which support endian-specific options.
|
||||
void endian(EndianType endian_);
|
||||
EndianType endian(void) const;
|
||||
|
||||
// Image filename to read or write
|
||||
void file(FILE *file_);
|
||||
FILE *file(void) const;
|
||||
|
||||
// Image filename to read or write
|
||||
void fileName(const std::string &fileName_);
|
||||
std::string fileName(void) const;
|
||||
|
||||
// Color to use when filling drawn objects
|
||||
void fillColor(const Color &fillColor_);
|
||||
Color fillColor(void) const;
|
||||
|
||||
// Fill pattern
|
||||
void fillPattern(const MagickCore::Image *fillPattern_);
|
||||
const MagickCore::Image *fillPattern(void) const;
|
||||
|
||||
// Rule to use when filling drawn objects
|
||||
void fillRule(const FillRule &fillRule_);
|
||||
FillRule fillRule(void) const;
|
||||
|
||||
// Font name
|
||||
void font(const std::string &font_);
|
||||
std::string font(void) const;
|
||||
|
||||
// Font name
|
||||
void fontFamily(const std::string &family_);
|
||||
std::string fontFamily(void) const;
|
||||
|
||||
// Font point size
|
||||
void fontPointsize(double pointSize_);
|
||||
double fontPointsize(void) const;
|
||||
|
||||
// Font style
|
||||
void fontStyle(const StyleType style_);
|
||||
StyleType fontStyle(void) const;
|
||||
|
||||
// Font weight
|
||||
void fontWeight(const size_t weight_);
|
||||
size_t fontWeight(void) const;
|
||||
|
||||
std::string format(void) const;
|
||||
|
||||
// Image interlace scheme
|
||||
void interlaceType(InterlaceType interlace_);
|
||||
InterlaceType interlaceType(void) const;
|
||||
|
||||
// Image format to write or read
|
||||
void magick(const std::string &magick_);
|
||||
std::string magick(void) const;
|
||||
|
||||
// Transparent color
|
||||
void matteColor(const Color &matteColor_);
|
||||
Color matteColor(void) const;
|
||||
|
||||
// Write as a monochrome image
|
||||
void monochrome(bool monochromeFlag_);
|
||||
bool monochrome(void) const;
|
||||
|
||||
// Preferred size and location of an image canvas.
|
||||
void page(const Geometry &pageSize_);
|
||||
Geometry page(void) const;
|
||||
|
||||
// Desired image quality factor
|
||||
void quality(size_t quality_);
|
||||
size_t quality(void) const;
|
||||
|
||||
// Maximum number of colors to quantize to
|
||||
void quantizeColors(size_t colors_);
|
||||
size_t quantizeColors(void) const;
|
||||
|
||||
// Colorspace to quantize in.
|
||||
void quantizeColorSpace(ColorspaceType colorSpace_);
|
||||
ColorspaceType quantizeColorSpace(void) const;
|
||||
|
||||
// Dither image during quantization.
|
||||
void quantizeDither(bool ditherFlag_);
|
||||
bool quantizeDither(void) const;
|
||||
|
||||
// Dither method
|
||||
void quantizeDitherMethod(DitherMethod ditherMethod_);
|
||||
DitherMethod quantizeDitherMethod(void) const;
|
||||
|
||||
// Quantization tree-depth
|
||||
void quantizeTreeDepth(size_t treeDepth_);
|
||||
size_t quantizeTreeDepth(void) const;
|
||||
|
||||
// Suppress all warning messages. Error messages are still reported.
|
||||
void quiet(const bool quiet_);
|
||||
bool quiet(void) const;
|
||||
|
||||
// Units of resolution to interpret density
|
||||
void resolutionUnits(ResolutionType resolutionUnits_);
|
||||
ResolutionType resolutionUnits(void) const;
|
||||
|
||||
// Image sampling factor
|
||||
void samplingFactor(const std::string &samplingFactor_);
|
||||
std::string samplingFactor(void) const;
|
||||
|
||||
// Image size (required for raw formats)
|
||||
void size(const Geometry &geometry_);
|
||||
Geometry size(void) const;
|
||||
|
||||
// enabled/disable stroke anti-aliasing
|
||||
void strokeAntiAlias(bool flag_);
|
||||
bool strokeAntiAlias(void) const ;
|
||||
|
||||
// Color to use when drawing object outlines
|
||||
void strokeColor(const Color &strokeColor_);
|
||||
Color strokeColor(void) const;
|
||||
|
||||
// Control the pattern of dashes and gaps used to stroke
|
||||
// paths. The strokeDashArray represents a list of numbers that
|
||||
// specify the lengths of alternating dashes and gaps in user
|
||||
// units. If an odd number of values is provided, then the list of
|
||||
// values is repeated to yield an even number of values.
|
||||
void strokeDashArray(const double *strokeDashArray_);
|
||||
const double *strokeDashArray(void) const;
|
||||
|
||||
// While drawing using strokeDashArray, specify distance into the dash
|
||||
// pattern to start the dash (default 0).
|
||||
void strokeDashOffset(double strokeDashOffset_);
|
||||
double strokeDashOffset(void) const;
|
||||
|
||||
// Specify the shape to be used at the end of open subpaths when
|
||||
// they are stroked. Values of LineCap are UndefinedCap, ButtCap,
|
||||
// RoundCap, and SquareCap.
|
||||
void strokeLineCap(LineCap lineCap_);
|
||||
LineCap strokeLineCap(void) const;
|
||||
|
||||
// Specify the shape to be used at the corners of paths (or other
|
||||
// vector shapes) when they are stroked. Values of LineJoin are
|
||||
// UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
|
||||
void strokeLineJoin(LineJoin lineJoin_);
|
||||
LineJoin strokeLineJoin(void) const;
|
||||
|
||||
// Specify miter limit. When two line segments meet at a sharp
|
||||
// angle and miter joins have been specified for 'lineJoin', it is
|
||||
// possible for the miter to extend far beyond the thickness of
|
||||
// the line stroking the path. The miterLimit' imposes a limit on
|
||||
// the ratio of the miter length to the 'stroke_width'. The default
|
||||
// value of this parameter is 4.
|
||||
void strokeMiterLimit(size_t miterLimit_);
|
||||
size_t strokeMiterLimit(void) const;
|
||||
|
||||
// Pattern image to use for stroked outlines
|
||||
void strokePattern(const MagickCore::Image *strokePattern_);
|
||||
const MagickCore::Image *strokePattern(void) const;
|
||||
|
||||
// Stroke width for drawing vector objects (default one)
|
||||
void strokeWidth(double strokeWidth_);
|
||||
double strokeWidth(void) const;
|
||||
|
||||
void subImage(size_t subImage_);
|
||||
size_t subImage(void) const;
|
||||
|
||||
// Sub-frame number to return
|
||||
void subRange(size_t subRange_);
|
||||
size_t subRange(void) const;
|
||||
|
||||
// Render text right-to-left or left-to-right.
|
||||
void textDirection(DirectionType direction_);
|
||||
DirectionType textDirection() const;
|
||||
|
||||
// Annotation text encoding (e.g. "UTF-16")
|
||||
void textEncoding(const std::string &encoding_);
|
||||
std::string textEncoding(void) const;
|
||||
|
||||
// Text gravity.
|
||||
void textGravity(GravityType gravity_);
|
||||
GravityType textGravity() const;
|
||||
|
||||
// Text inter-line spacing
|
||||
void textInterlineSpacing(double spacing_);
|
||||
double textInterlineSpacing(void) const;
|
||||
|
||||
// Text inter-word spacing
|
||||
void textInterwordSpacing(double spacing_);
|
||||
double textInterwordSpacing(void) const;
|
||||
|
||||
// Text inter-character kerning
|
||||
void textKerning(double kerning_);
|
||||
double textKerning(void) const;
|
||||
|
||||
// Text undercolor box
|
||||
void textUnderColor(const Color &underColor_);
|
||||
Color textUnderColor(void) const;
|
||||
|
||||
void tileName(const std::string &tileName_);
|
||||
std::string tileName(void) const;
|
||||
|
||||
// Origin of coordinate system to use when annotating with text or drawing
|
||||
void transformOrigin(double tx_,double ty_);
|
||||
|
||||
// Reset transformation parameters to default
|
||||
void transformReset(void);
|
||||
|
||||
// Rotation to use when annotating with text or drawing
|
||||
void transformRotation(double angle_);
|
||||
|
||||
// Scale to use when annotating with text or drawing
|
||||
void transformScale(double sx_,double sy_);
|
||||
|
||||
// Skew to use in X axis when annotating with text or drawing
|
||||
void transformSkewX(double skewx_);
|
||||
|
||||
// Skew to use in Y axis when annotating with text or drawing
|
||||
void transformSkewY(double skewy_);
|
||||
|
||||
// Image representation type
|
||||
void type(const ImageType type_);
|
||||
ImageType type(void) const;
|
||||
|
||||
// Return verbose information about an image, or an operation
|
||||
void verbose(bool verboseFlag_);
|
||||
bool verbose(void) const;
|
||||
|
||||
void view(const std::string &view_);
|
||||
std::string view(void) const;
|
||||
|
||||
// Virtual pixel method.
|
||||
void virtualPixelMethod(VirtualPixelMethod virtual_pixel_method_);
|
||||
VirtualPixelMethod virtualPixelMethod(void) const;
|
||||
|
||||
// X11 display name
|
||||
void x11Display(const std::string &display_);
|
||||
std::string x11Display(void) const;
|
||||
|
||||
//
|
||||
// Internal implementation methods. Please do not use.
|
||||
//
|
||||
|
||||
MagickCore::DrawInfo *drawInfo(void);
|
||||
MagickCore::ImageInfo *imageInfo(void);
|
||||
MagickCore::QuantizeInfo *quantizeInfo(void);
|
||||
|
||||
// Construct using raw structures
|
||||
Options(const MagickCore::ImageInfo *imageInfo_,
|
||||
const MagickCore::QuantizeInfo *quantizeInfo_,
|
||||
const MagickCore::DrawInfo *drawInfo_);
|
||||
|
||||
private:
|
||||
|
||||
// Assignment not supported
|
||||
Options& operator=(const Options&);
|
||||
|
||||
void setOption(const char *name,const Color &value_);
|
||||
|
||||
void setOption(const char *name,const double value_);
|
||||
|
||||
MagickCore::ImageInfo *_imageInfo;
|
||||
MagickCore::QuantizeInfo *_quantizeInfo;
|
||||
MagickCore::DrawInfo *_drawInfo;
|
||||
bool _quiet;
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_Options_header
|
@ -1,149 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Representation of a pixel view.
|
||||
//
|
||||
|
||||
#if !defined(Magick_Pixels_header)
|
||||
#define Magick_Pixels_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include "Magick++/Color.h"
|
||||
#include "Magick++/Image.h"
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport Pixels
|
||||
{
|
||||
public:
|
||||
|
||||
// Construct pixel view using specified image.
|
||||
Pixels(Magick::Image &image_);
|
||||
|
||||
// Destroy pixel view
|
||||
~Pixels(void);
|
||||
|
||||
// Transfer pixels from the image to the pixel view as defined by
|
||||
// the specified region. Modified pixels may be subsequently
|
||||
// transferred back to the image via sync.
|
||||
PixelPacket *get(const ::ssize_t x_, const ::ssize_t y_,
|
||||
const size_t columns_,const size_t rows_ );
|
||||
|
||||
// Transfer read-only pixels from the image to the pixel view as
|
||||
// defined by the specified region.
|
||||
const PixelPacket *getConst(const ::ssize_t x_,const ::ssize_t y_,
|
||||
const size_t columns_,const size_t rows_);
|
||||
|
||||
// Allocate a pixel view region to store image pixels as defined
|
||||
// by the region rectangle. This area is subsequently transferred
|
||||
// from the pixel view to the image via sync.
|
||||
PixelPacket *set(const ::ssize_t x_,const ::ssize_t y_,
|
||||
const size_t columns_,const size_t rows_);
|
||||
|
||||
// Transfers the image view pixels to the image.
|
||||
void sync(void);
|
||||
|
||||
// Width of view
|
||||
size_t columns(void) const;
|
||||
|
||||
// Return pixel colormap index array
|
||||
IndexPacket *indexes(void);
|
||||
|
||||
// Height of view
|
||||
size_t rows (void) const;
|
||||
|
||||
// Left ordinate of view
|
||||
::ssize_t x(void) const;
|
||||
|
||||
// Top ordinate of view
|
||||
::ssize_t y(void) const;
|
||||
|
||||
private:
|
||||
|
||||
// Copying and assigning Pixels is not supported.
|
||||
Pixels(const Pixels& pixels_);
|
||||
const Pixels& operator=(const Pixels& pixels_);
|
||||
|
||||
Magick::Image _image; // Image reference
|
||||
MagickCore::CacheView *_view; // Image view handle
|
||||
::ssize_t _x; // Left ordinate of view
|
||||
::ssize_t _y; // Top ordinate of view
|
||||
size_t _columns; // Width of view
|
||||
size_t _rows; // Height of view
|
||||
|
||||
}; // class Pixels
|
||||
|
||||
class MagickPPExport PixelData
|
||||
{
|
||||
public:
|
||||
|
||||
// Construct pixel data using specified image
|
||||
PixelData(Magick::Image &image_,std::string map_,const StorageType type_);
|
||||
|
||||
// Construct pixel data using specified image
|
||||
PixelData(Magick::Image &image_,const ::ssize_t x_,const ::ssize_t y_,
|
||||
const size_t width_,const size_t height_,std::string map_,
|
||||
const StorageType type_);
|
||||
|
||||
// Destroy pixel data
|
||||
~PixelData(void);
|
||||
|
||||
// Pixel data buffer
|
||||
const void *data(void) const;
|
||||
|
||||
// Length of the buffer
|
||||
::ssize_t length(void) const;
|
||||
|
||||
// Size of the buffer in bytes
|
||||
::ssize_t size(void) const;
|
||||
|
||||
private:
|
||||
|
||||
// Copying and assigning PixelData is not supported
|
||||
PixelData(const PixelData& pixels_);
|
||||
const PixelData& operator=(const PixelData& pixels_);
|
||||
|
||||
void init(Magick::Image &image_,const ::ssize_t x_,const ::ssize_t y_,
|
||||
const size_t width_,const size_t height_,std::string map_,
|
||||
const StorageType type_);
|
||||
|
||||
void relinquish(void) throw();
|
||||
|
||||
void *_data; // The pixel data
|
||||
::ssize_t _length; // Length of the data
|
||||
::ssize_t _size; // Size of the data
|
||||
}; // class PixelData
|
||||
|
||||
} // Magick namespace
|
||||
|
||||
//
|
||||
// Inline methods
|
||||
//
|
||||
|
||||
// Left ordinate of view
|
||||
inline ::ssize_t Magick::Pixels::x(void) const
|
||||
{
|
||||
return _x;
|
||||
}
|
||||
|
||||
// Top ordinate of view
|
||||
inline ::ssize_t Magick::Pixels::y(void) const
|
||||
{
|
||||
return _y;
|
||||
}
|
||||
|
||||
// Width of view
|
||||
inline size_t Magick::Pixels::columns(void) const
|
||||
{
|
||||
return _columns;
|
||||
}
|
||||
|
||||
// Height of view
|
||||
inline size_t Magick::Pixels::rows(void) const
|
||||
{
|
||||
return _rows;
|
||||
}
|
||||
|
||||
#endif // Magick_Pixels_header
|
@ -1,76 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Dirk Lemstra 2014-2018
|
||||
//
|
||||
// Definition of resource limits.
|
||||
//
|
||||
|
||||
#if !defined(Magick_ResourceLimits_header)
|
||||
#define Magick_ResourceLimits_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport ResourceLimits
|
||||
{
|
||||
public:
|
||||
|
||||
// Pixel cache limit in bytes. Requests for memory above this limit
|
||||
// are automagically allocated on disk.
|
||||
static void area(const MagickSizeType limit_);
|
||||
static MagickSizeType area(void);
|
||||
|
||||
// Pixel cache limit in bytes. Requests for memory above this limit
|
||||
// will fail.
|
||||
static void disk(const MagickSizeType limit_);
|
||||
static MagickSizeType disk(void);
|
||||
|
||||
// The maximum number of open pixel cache files. When this limit is
|
||||
// exceeded, any subsequent pixels cached to disk are closed and reopened
|
||||
// on demand. This behavior permits a large number of images to be accessed
|
||||
// simultaneously on disk, but with a speed penalty due to repeated
|
||||
// open/close calls.
|
||||
static void file(const MagickSizeType limit_);
|
||||
static MagickSizeType file(void);
|
||||
|
||||
// The maximum height of an image.
|
||||
static void height(const MagickSizeType limit_);
|
||||
static MagickSizeType height(void);
|
||||
|
||||
// The maximum number of images in an image list.
|
||||
static void listLength(const MagickSizeType limit_);
|
||||
static MagickSizeType listLength();
|
||||
|
||||
// Pixel cache limit in bytes. Once this memory limit is exceeded,
|
||||
// all subsequent pixels cache operations are to/from disk.
|
||||
static void map(const MagickSizeType limit_);
|
||||
static MagickSizeType map(void);
|
||||
|
||||
// Pixel cache limit in bytes. Once this memory limit is exceeded,
|
||||
// all subsequent pixels cache operations are to/from disk or to/from
|
||||
// memory mapped files.
|
||||
static void memory(const MagickSizeType limit_);
|
||||
static MagickSizeType memory(void);
|
||||
|
||||
// Limits the number of threads used in multithreaded operations.
|
||||
static void thread(const MagickSizeType limit_);
|
||||
static MagickSizeType thread(void);
|
||||
|
||||
// Periodically yield the CPU for at least the time specified in
|
||||
// milliseconds.
|
||||
static void throttle(const MagickSizeType limit_);
|
||||
static MagickSizeType throttle(void);
|
||||
|
||||
// The maximum width of an image.
|
||||
static void width(const MagickSizeType limit_);
|
||||
static MagickSizeType width(void);
|
||||
|
||||
private:
|
||||
ResourceLimits(void);
|
||||
|
||||
}; // class ResourceLimits
|
||||
|
||||
} // Magick namespace
|
||||
|
||||
#endif // Magick_ResourceLimits_header
|
File diff suppressed because it is too large
Load Diff
@ -1,100 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003
|
||||
//
|
||||
// Definition of types and classes to support threads
|
||||
//
|
||||
// This class is a Magick++ implementation class and is not intended
|
||||
// for use by end-users.
|
||||
//
|
||||
#if !defined (Magick_Thread_header)
|
||||
#define Magick_Thread_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
|
||||
#if defined(_VISUALC_)
|
||||
#include <windows.h>
|
||||
#if defined(_MT)
|
||||
struct win32_mutex {
|
||||
HANDLE id;
|
||||
};
|
||||
|
||||
// This is a binary semphore -- increase for a counting semaphore
|
||||
#define MAXSEMLEN 1
|
||||
#endif // defined(_MT)
|
||||
#endif // defined(_VISUALC_)
|
||||
|
||||
#if defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
# include <pthread.h>
|
||||
#endif // defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
// Mutex lock wrapper
|
||||
class MagickPPExport MutexLock
|
||||
{
|
||||
public:
|
||||
// Default constructor
|
||||
MutexLock(void);
|
||||
|
||||
// Destructor
|
||||
~MutexLock(void);
|
||||
|
||||
// Lock mutex
|
||||
void lock(void);
|
||||
|
||||
// Unlock mutex
|
||||
void unlock(void);
|
||||
|
||||
private:
|
||||
|
||||
// Don't support copy constructor
|
||||
MutexLock ( const MutexLock& original_ );
|
||||
|
||||
// Don't support assignment
|
||||
MutexLock& operator = ( const MutexLock& original_ );
|
||||
|
||||
#if defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
pthread_mutex_t _mutex;
|
||||
#endif
|
||||
#if defined(_MT) && defined(_VISUALC_)
|
||||
win32_mutex _mutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Lock mutex while object is in scope
|
||||
class MagickPPExport Lock
|
||||
{
|
||||
public:
|
||||
// Construct with mutex lock (locks mutex)
|
||||
Lock( MutexLock *mutexLock_ );
|
||||
|
||||
// Destrutor (unlocks mutex)
|
||||
~Lock( void );
|
||||
private:
|
||||
|
||||
// Don't support copy constructor
|
||||
Lock ( const Lock& original_ );
|
||||
|
||||
// Don't support assignment
|
||||
Lock& operator = ( const Lock& original_ );
|
||||
|
||||
MutexLock* _mutexLock;
|
||||
};
|
||||
}
|
||||
|
||||
// Construct with mutex lock (locks mutex)
|
||||
inline Magick::Lock::Lock( MutexLock *mutexLock_ )
|
||||
: _mutexLock(mutexLock_)
|
||||
{
|
||||
_mutexLock->lock();
|
||||
}
|
||||
|
||||
// Destrutor (unlocks mutex)
|
||||
inline Magick::Lock::~Lock( void )
|
||||
{
|
||||
_mutexLock->unlock();
|
||||
_mutexLock=0;
|
||||
}
|
||||
|
||||
#endif // Magick_Thread_header
|
@ -1,59 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// TypeMetric Definition
|
||||
//
|
||||
// Container for font type metrics
|
||||
//
|
||||
|
||||
#if !defined (Magick_TypeMetric_header)
|
||||
#define Magick_TypeMetric_header
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
|
||||
namespace Magick
|
||||
{
|
||||
class MagickPPExport TypeMetric
|
||||
{
|
||||
friend class Image;
|
||||
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
TypeMetric(void);
|
||||
|
||||
// Destructor
|
||||
~TypeMetric(void);
|
||||
|
||||
// Ascent, the distance in pixels from the text baseline to the
|
||||
// highest/upper grid coordinate used to place an outline point.
|
||||
double ascent(void) const;
|
||||
|
||||
// Descent, the distance in pixels from the baseline to the lowest
|
||||
// grid coordinate used to place an outline point. Always a
|
||||
// negative value.
|
||||
double descent(void) const;
|
||||
|
||||
// Maximum horizontal advance in pixels.
|
||||
double maxHorizontalAdvance(void) const;
|
||||
|
||||
// Text height in pixels.
|
||||
double textHeight(void) const;
|
||||
|
||||
// Text width in pixels.
|
||||
double textWidth(void) const;
|
||||
|
||||
// Underline position.
|
||||
double underlinePosition(void) const;
|
||||
|
||||
// Underline thickness.
|
||||
double underlineThickness(void) const;
|
||||
|
||||
private:
|
||||
MagickCore::TypeMetric _typeMetric;
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_TypeMetric_header
|
@ -1,119 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
//
|
||||
// Implementation of Montage
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
#include "Magick++/Montage.h"
|
||||
#include "Magick++/Functions.h"
|
||||
|
||||
Magick::Montage::Montage(void)
|
||||
: _backgroundColor("#ffffff"),
|
||||
_compose(OverCompositeOp),
|
||||
_fileName(),
|
||||
_fill("#000000ff"),
|
||||
_font(),
|
||||
_geometry("120x120+4+3>"),
|
||||
_gravity(CenterGravity),
|
||||
_label(),
|
||||
_pointSize(12),
|
||||
_shadow(false),
|
||||
_stroke(),
|
||||
_texture(),
|
||||
_tile("6x4"),
|
||||
_title(),
|
||||
_transparentColor()
|
||||
{
|
||||
}
|
||||
|
||||
Magick::Montage::~Montage(void)
|
||||
{
|
||||
}
|
||||
|
||||
void Magick::Montage::updateMontageInfo(MontageInfo &montageInfo_) const
|
||||
{
|
||||
(void) memset(&montageInfo_,0,sizeof(montageInfo_));
|
||||
|
||||
// background_color
|
||||
montageInfo_.background_color=_backgroundColor;
|
||||
// border_color
|
||||
montageInfo_.border_color=Color();
|
||||
// border_width
|
||||
montageInfo_.border_width=0;
|
||||
// filename
|
||||
if (_fileName.length() != 0)
|
||||
{
|
||||
_fileName.copy(montageInfo_.filename,MaxTextExtent-1);
|
||||
montageInfo_.filename[_fileName.length()]=0; // null terminate
|
||||
}
|
||||
// fill
|
||||
montageInfo_.fill=_fill;
|
||||
// font
|
||||
if (_font.length() != 0)
|
||||
Magick::CloneString(&montageInfo_.font,_font);
|
||||
// geometry
|
||||
if (_geometry.isValid())
|
||||
Magick::CloneString(&montageInfo_.geometry,_geometry);
|
||||
// gravity
|
||||
montageInfo_.gravity=_gravity;
|
||||
// matte_color
|
||||
montageInfo_.matte_color=Color();
|
||||
// pointsize
|
||||
montageInfo_.pointsize=_pointSize;
|
||||
// shadow
|
||||
montageInfo_.shadow=static_cast<MagickBooleanType>(_shadow ? MagickTrue :
|
||||
MagickFalse);
|
||||
// signature (validity stamp)
|
||||
montageInfo_.signature=MagickSignature;
|
||||
// stroke
|
||||
montageInfo_.stroke=_stroke;
|
||||
// texture
|
||||
if (_texture.length() != 0)
|
||||
Magick::CloneString(&montageInfo_.texture,_texture);
|
||||
// tile
|
||||
if (_tile.isValid())
|
||||
Magick::CloneString( &montageInfo_.tile, _tile );
|
||||
// title
|
||||
if (_title.length() != 0)
|
||||
Magick::CloneString(&montageInfo_.title,_title);
|
||||
}
|
||||
|
||||
//
|
||||
// Implementation of MontageFramed
|
||||
//
|
||||
|
||||
Magick::MontageFramed::MontageFramed(void)
|
||||
: _borderColor("#dfdfdf"),
|
||||
_borderWidth(0),
|
||||
_frame(),
|
||||
_matteColor("#bdbdbd")
|
||||
{
|
||||
}
|
||||
|
||||
Magick::MontageFramed::~MontageFramed(void)
|
||||
{
|
||||
}
|
||||
|
||||
void Magick::MontageFramed::updateMontageInfo(MontageInfo &montageInfo_) const
|
||||
{
|
||||
// Do base updates
|
||||
Montage::updateMontageInfo(montageInfo_);
|
||||
|
||||
// border_color
|
||||
montageInfo_.border_color=_borderColor;
|
||||
// border_width
|
||||
montageInfo_.border_width=_borderWidth;
|
||||
// frame
|
||||
if (_frame.isValid())
|
||||
Magick::CloneString(&montageInfo_.frame,_frame);
|
||||
// matte_color
|
||||
montageInfo_.matte_color=_matteColor;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,194 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Pixels Implementation
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Include.h"
|
||||
#include <string> // This is here to compile with Visual C++
|
||||
#include "Magick++/Thread.h"
|
||||
#include "Magick++/Exception.h"
|
||||
#include "Magick++/Pixels.h"
|
||||
|
||||
Magick::Pixels::Pixels(Magick::Image &image_)
|
||||
: _image(image_),
|
||||
_x(0),
|
||||
_y(0),
|
||||
_columns(0),
|
||||
_rows(0)
|
||||
{
|
||||
GetPPException;
|
||||
_view=AcquireVirtualCacheView(image_.image(),exceptionInfo);
|
||||
ThrowPPException(image_.quiet());
|
||||
}
|
||||
|
||||
Magick::Pixels::~Pixels(void)
|
||||
{
|
||||
if (_view != (MagickCore::CacheView *) NULL)
|
||||
_view=DestroyCacheView(_view);
|
||||
}
|
||||
|
||||
Magick::PixelPacket* Magick::Pixels::get(const ssize_t x_,const ssize_t y_,
|
||||
const size_t columns_,const size_t rows_)
|
||||
{
|
||||
_x=x_;
|
||||
_y=y_;
|
||||
_columns=columns_;
|
||||
_rows=rows_;
|
||||
|
||||
GetPPException;
|
||||
PixelPacket* pixels=GetCacheViewAuthenticPixels(_view,x_,y_,columns_,rows_,
|
||||
exceptionInfo);
|
||||
ThrowPPException(_image.quiet());
|
||||
|
||||
return pixels;
|
||||
}
|
||||
|
||||
const Magick::PixelPacket* Magick::Pixels::getConst(const ssize_t x_,
|
||||
const ssize_t y_,const size_t columns_,const size_t rows_)
|
||||
{
|
||||
_x=x_;
|
||||
_y=y_;
|
||||
_columns=columns_;
|
||||
_rows=rows_;
|
||||
|
||||
GetPPException;
|
||||
const PixelPacket* pixels=GetCacheViewVirtualPixels(_view,x_,y_,columns_,
|
||||
rows_,exceptionInfo);
|
||||
ThrowPPException(_image.quiet());
|
||||
|
||||
return pixels;
|
||||
}
|
||||
|
||||
Magick::PixelPacket* Magick::Pixels::set(const ssize_t x_,const ssize_t y_,
|
||||
const size_t columns_,const size_t rows_)
|
||||
{
|
||||
_x=x_;
|
||||
_y=y_;
|
||||
_columns=columns_;
|
||||
_rows=rows_;
|
||||
|
||||
GetPPException;
|
||||
PixelPacket* pixels=QueueCacheViewAuthenticPixels(_view,x_,y_,columns_,rows_,
|
||||
exceptionInfo);
|
||||
ThrowPPException(_image.quiet());
|
||||
|
||||
return pixels;
|
||||
}
|
||||
|
||||
void Magick::Pixels::sync(void)
|
||||
{
|
||||
GetPPException;
|
||||
(void) SyncCacheViewAuthenticPixels(_view,exceptionInfo);
|
||||
ThrowPPException(_image.quiet());
|
||||
}
|
||||
|
||||
Magick::IndexPacket* Magick::Pixels::indexes (void)
|
||||
{
|
||||
IndexPacket* pixel_indexes=GetCacheViewAuthenticIndexQueue(_view);
|
||||
|
||||
if (!pixel_indexes)
|
||||
_image.throwImageException();
|
||||
|
||||
return pixel_indexes;
|
||||
}
|
||||
|
||||
Magick::PixelData::PixelData(Magick::Image &image_,std::string map_,
|
||||
const StorageType type_)
|
||||
{
|
||||
init(image_,0,0,image_.columns(),image_.rows(),map_,type_);
|
||||
}
|
||||
|
||||
Magick::PixelData::PixelData(Magick::Image &image_,const ::ssize_t x_,
|
||||
const ::ssize_t y_,const size_t width_,const size_t height_,std::string map_,
|
||||
const StorageType type_)
|
||||
{
|
||||
init(image_,x_,y_,width_,height_,map_,type_);
|
||||
}
|
||||
|
||||
Magick::PixelData::~PixelData(void)
|
||||
{
|
||||
relinquish();
|
||||
}
|
||||
|
||||
const void *Magick::PixelData::data(void) const
|
||||
{
|
||||
return(_data);
|
||||
}
|
||||
|
||||
::ssize_t Magick::PixelData::length(void) const
|
||||
{
|
||||
return(_length);
|
||||
}
|
||||
|
||||
::ssize_t Magick::PixelData::size(void) const
|
||||
{
|
||||
return(_size);
|
||||
}
|
||||
|
||||
void Magick::PixelData::init(Magick::Image &image_,const ::ssize_t x_,
|
||||
const ::ssize_t y_,const size_t width_,const size_t height_,
|
||||
std::string map_,const StorageType type_)
|
||||
{
|
||||
size_t
|
||||
size;
|
||||
|
||||
_data=(void *) NULL;
|
||||
_length=0;
|
||||
_size=0;
|
||||
if ((x_ < 0) || (width_ == 0) || (y_ < 0) || (height_ == 0) ||
|
||||
(x_ > (ssize_t) image_.columns()) || ((width_ + x_) > image_.columns())
|
||||
|| (y_ > (ssize_t) image_.rows()) || ((height_ + y_) > image_.rows())
|
||||
|| (map_.length() == 0))
|
||||
return;
|
||||
|
||||
switch(type_)
|
||||
{
|
||||
case CharPixel:
|
||||
size=sizeof(unsigned char);
|
||||
break;
|
||||
case DoublePixel:
|
||||
size=sizeof(double);
|
||||
break;
|
||||
case FloatPixel:
|
||||
size=sizeof(float);
|
||||
break;
|
||||
case IntegerPixel:
|
||||
case LongPixel:
|
||||
size=sizeof(unsigned int);
|
||||
break;
|
||||
case QuantumPixel:
|
||||
size=sizeof(Quantum);
|
||||
break;
|
||||
case ShortPixel:
|
||||
size=sizeof(unsigned short);
|
||||
break;
|
||||
default:
|
||||
throwExceptionExplicit(OptionError,"Invalid type");
|
||||
return;
|
||||
}
|
||||
|
||||
_length=width_*height_*map_.length();
|
||||
_size=_length*size;
|
||||
_data=AcquireMagickMemory(_size);
|
||||
|
||||
GetPPException;
|
||||
MagickCore::ExportImagePixels(image_.constImage(),x_,y_,width_,height_,
|
||||
map_.c_str(),type_,_data,exceptionInfo);
|
||||
if (exceptionInfo->severity != UndefinedException)
|
||||
relinquish();
|
||||
ThrowPPException(image_.quiet());
|
||||
}
|
||||
|
||||
void Magick::PixelData::relinquish(void) throw()
|
||||
{
|
||||
if (_data != (void *)NULL)
|
||||
_data=RelinquishMagickMemory(_data);
|
||||
_length=0;
|
||||
_size=0;
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Dirk Lemstra 2014-2018
|
||||
//
|
||||
// Implementation of ResourceLimits
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/ResourceLimits.h"
|
||||
|
||||
void Magick::ResourceLimits::area(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(AreaResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::area(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(AreaResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::disk(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(DiskResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::disk(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(DiskResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::file(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(FileResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::file(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(FileResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::height(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(HeightResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::height(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(HeightResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::listLength(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(ListLengthResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::listLength(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(ListLengthResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::map(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(MapResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::map(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(MapResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::memory(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(MemoryResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::memory(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(MemoryResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::thread(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(ThreadResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::thread(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(ThreadResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::throttle(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(ThrottleResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::throttle(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(ThrottleResource));
|
||||
}
|
||||
|
||||
void Magick::ResourceLimits::width(const MagickSizeType limit_)
|
||||
{
|
||||
(void) SetMagickResourceLimit(WidthResource,limit_);
|
||||
}
|
||||
|
||||
MagickCore::MagickSizeType Magick::ResourceLimits::width(void)
|
||||
{
|
||||
return(GetMagickResourceLimit(WidthResource));
|
||||
}
|
||||
|
||||
Magick::ResourceLimits::ResourceLimits()
|
||||
{
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,102 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2017
|
||||
//
|
||||
// Implementation of thread support
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/Thread.h"
|
||||
#include "Magick++/Exception.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// Default constructor
|
||||
Magick::MutexLock::MutexLock(void)
|
||||
#if defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
// POSIX threads
|
||||
: _mutex()
|
||||
{
|
||||
::pthread_mutexattr_t attr;
|
||||
int sysError;
|
||||
if ( (sysError = ::pthread_mutexattr_init( &attr )) == 0 )
|
||||
if ( (sysError = ::pthread_mutex_init( &_mutex, &attr )) == 0 )
|
||||
{
|
||||
::pthread_mutexattr_destroy( &attr );
|
||||
return;
|
||||
}
|
||||
throwExceptionExplicit( OptionError, "mutex initialization failed",
|
||||
strerror(sysError) );
|
||||
}
|
||||
#else
|
||||
#if defined(_VISUALC_) && defined(_MT)
|
||||
// Win32 threads
|
||||
: _mutex()
|
||||
{
|
||||
SECURITY_ATTRIBUTES security;
|
||||
|
||||
/* Allow the semaphore to be inherited */
|
||||
security.nLength = sizeof(security);
|
||||
security.lpSecurityDescriptor = NULL;
|
||||
security.bInheritHandle = TRUE;
|
||||
|
||||
/* Create the semaphore, with initial value signaled */
|
||||
_mutex.id = ::CreateSemaphore(&security, 1, MAXSEMLEN, NULL);
|
||||
if ( _mutex.id != NULL )
|
||||
return;
|
||||
throwExceptionExplicit( OptionError, "mutex initialization failed" );
|
||||
}
|
||||
#else
|
||||
// Threads not supported
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Destructor
|
||||
Magick::MutexLock::~MutexLock(void)
|
||||
{
|
||||
#if defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
(void) ::pthread_mutex_destroy(&_mutex);
|
||||
#endif
|
||||
#if defined(_MT) && defined(_VISUALC_)
|
||||
(void) ::CloseHandle(_mutex.id);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Lock mutex
|
||||
void Magick::MutexLock::lock(void)
|
||||
{
|
||||
#if defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
int sysError;
|
||||
if ( (sysError = ::pthread_mutex_lock( &_mutex )) == 0)
|
||||
return;
|
||||
throwExceptionExplicit( OptionError, "mutex lock failed",
|
||||
strerror(sysError));
|
||||
#endif
|
||||
#if defined(_MT) && defined(_VISUALC_)
|
||||
if (WaitForSingleObject(_mutex.id,INFINITE) != WAIT_FAILED)
|
||||
return;
|
||||
throwExceptionExplicit( OptionError, "mutex lock failed" );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Unlock mutex
|
||||
void Magick::MutexLock::unlock(void)
|
||||
{
|
||||
#if defined(MAGICKCORE_HAVE_PTHREAD)
|
||||
int sysError;
|
||||
if ( (sysError = ::pthread_mutex_unlock( &_mutex )) == 0)
|
||||
return;
|
||||
throwExceptionExplicit( OptionError, "mutex unlock failed",
|
||||
strerror(sysError) );
|
||||
#endif
|
||||
#if defined(_MT) && defined(_VISUALC_)
|
||||
if ( ReleaseSemaphore(_mutex.id, 1, NULL) == TRUE )
|
||||
return;
|
||||
throwExceptionExplicit( OptionError, "mutex unlock failed" );
|
||||
#endif
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// TypeMetric implementation
|
||||
//
|
||||
|
||||
#define MAGICKCORE_IMPLEMENTATION 1
|
||||
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
|
||||
|
||||
#include "Magick++/TypeMetric.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Magick::TypeMetric::TypeMetric(void)
|
||||
{
|
||||
memset(&_typeMetric,0,sizeof(_typeMetric));
|
||||
}
|
||||
|
||||
Magick::TypeMetric::~TypeMetric(void)
|
||||
{
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::ascent(void) const
|
||||
{
|
||||
return(_typeMetric.ascent);
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::descent(void) const
|
||||
{
|
||||
return(_typeMetric.descent);
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::maxHorizontalAdvance(void) const
|
||||
{
|
||||
return(_typeMetric.max_advance);
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::textHeight(void) const
|
||||
{
|
||||
return(_typeMetric.height);
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::textWidth(void) const
|
||||
{
|
||||
return(_typeMetric.width);
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::underlinePosition(void) const
|
||||
{
|
||||
return(_typeMetric.underline_position);
|
||||
}
|
||||
|
||||
double Magick::TypeMetric::underlineThickness(void) const
|
||||
{
|
||||
return(_typeMetric.underline_thickness);
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
VERS_9.0 {
|
||||
global:
|
||||
*;
|
||||
};
|
@ -1,93 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2003
|
||||
//
|
||||
// Test STL appendImages function
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Test appendImages
|
||||
//
|
||||
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "test_image_anim.miff" );
|
||||
|
||||
Image appended;
|
||||
|
||||
// Horizontal
|
||||
appendImages( &appended, imageList.begin(), imageList.end() );
|
||||
// appended.display();
|
||||
if (( appended.signature() != "3a90bb0bb8f69f6788ab99e9e25598a0d6c5cdbbb797f77ad68011e0a8b1689d" ) &&
|
||||
( appended.signature() != "c15fcd1e739b73638dc4e36837bdb53f7087359544664caf7b1763928129f3c7" ) &&
|
||||
( appended.signature() != "229ff72f812e5f536245dc3b4502a0bc2ab2363f67c545863a85ab91ebfbfb83" ) &&
|
||||
( appended.signature() != "b98c42c55fc4e661cb3684154256809c03c0c6b53da2738b6ce8066e1b6ddef0" ))
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Horizontal append failed, signature = "
|
||||
<< appended.signature() << endl;
|
||||
appended.write("appendImages_horizontal_out.miff");
|
||||
// appended.display();
|
||||
}
|
||||
|
||||
// Vertical
|
||||
appendImages( &appended, imageList.begin(), imageList.end(), true );
|
||||
if (( appended.signature() != "d73d25ccd6011936d08b6d0d89183b7a61790544c2195269aff4db2f782ffc08" ) &&
|
||||
( appended.signature() != "0909f7ffa7c6ea410fb2ebfdbcb19d61b19c4bd271851ce3bd51662519dc2b58" ) &&
|
||||
( appended.signature() != "11b97ba6ac1664aa1c2faed4c86195472ae9cce2ed75402d975bb4ffcf1de751" ) &&
|
||||
( appended.signature() != "cae4815eeb3cb689e73b94d897a9957d3414d1d4f513e8b5e52579b05d164bfe" ))
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Vertical append failed, signature = "
|
||||
<< appended.signature() << endl;
|
||||
appended.write("appendImages_vertical_out.miff");
|
||||
// appended.display();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,75 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2003
|
||||
//
|
||||
// Test STL averageImages function
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Test averageImages
|
||||
//
|
||||
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "test_image_anim.miff" );
|
||||
|
||||
Image averaged;
|
||||
averageImages( &averaged, imageList.begin(), imageList.end() );
|
||||
// averaged.display();
|
||||
if ( 0 && averaged.signature() != "d4b4ffb8b70c4e9b0e50445542deb26fbcdf8c393c793123cbc92fb35341e44d" &&
|
||||
averaged.signature() != "62d46d6d239b9fbd3b8ff2271aed1b5dde6303e0d5228dd8d833f61a7b012a79" &&
|
||||
averaged.signature() != "fdc76a2689d19061e1f7f6adfd79a2c04bc4608125a2cd2a1bce0d981774e13f" &&
|
||||
averaged.signature() != "66dfb88c21405a6bf582c9a542d87fd14db176aae1f34bc30b0b3e2443b49aa8" &&
|
||||
averaged.signature() != "f3bc318abc0b842c656b6545d1d7159eedb61f559a95fc5df671db7d0c0639de")
|
||||
{
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Averaging image failed, signature = "
|
||||
<< averaged.signature() << endl;
|
||||
averaged.display();
|
||||
++failures;
|
||||
}
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2003
|
||||
//
|
||||
// Test STL coalesceImages function
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Test coalesceImages
|
||||
//
|
||||
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "test_image_anim.miff" );
|
||||
|
||||
list<Image> coalescedList;
|
||||
coalesceImages( &coalescedList, imageList.begin(), imageList.end() );
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,134 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002, 2003
|
||||
//
|
||||
// Test Magick::CoderInfo class and Magick::coderInfoList
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int test( CoderInfo::MatchType isReadable_,
|
||||
CoderInfo::MatchType isWritable_,
|
||||
CoderInfo::MatchType isMultiFrame_ )
|
||||
{
|
||||
int result = 0;
|
||||
list<CoderInfo> coderList;
|
||||
coderInfoList( &coderList, isReadable_, isWritable_, isMultiFrame_ );
|
||||
list<CoderInfo>::iterator entry = coderList.begin();
|
||||
while( entry != coderList.end() )
|
||||
{
|
||||
// Readable
|
||||
if ( isReadable_ != CoderInfo::AnyMatch &&
|
||||
(( entry->isReadable() && isReadable_ != CoderInfo::TrueMatch ) ||
|
||||
( !entry->isReadable() && isReadable_ != CoderInfo::FalseMatch )) )
|
||||
{
|
||||
cout << "Entry \""
|
||||
<< entry->name()
|
||||
<< "\" has unexpected readablity state ("
|
||||
<< static_cast<int>(entry->isReadable())
|
||||
<< ")"
|
||||
<< endl;
|
||||
++result;
|
||||
}
|
||||
|
||||
// Writable
|
||||
if ( isWritable_ != CoderInfo::AnyMatch &&
|
||||
(( entry->isWritable() && isWritable_ != CoderInfo::TrueMatch ) ||
|
||||
( !entry->isWritable() && isWritable_ != CoderInfo::FalseMatch )) )
|
||||
{
|
||||
cout << "Entry \""
|
||||
<< entry->name()
|
||||
<< "\" has unexpected writablity state ("
|
||||
<< static_cast<int>(entry->isWritable())
|
||||
<< ")"
|
||||
<< endl;
|
||||
++result;
|
||||
}
|
||||
|
||||
// MultiFrame
|
||||
if ( isMultiFrame_ != CoderInfo::AnyMatch &&
|
||||
(( entry->isMultiFrame() && isMultiFrame_ != CoderInfo::TrueMatch ) ||
|
||||
( !entry->isMultiFrame() && isMultiFrame_ != CoderInfo::FalseMatch )) )
|
||||
{
|
||||
cout << "Entry \""
|
||||
<< entry->name()
|
||||
<< "\" has unexpected multiframe state ("
|
||||
<< static_cast<int>(entry->isMultiFrame())
|
||||
<< ")"
|
||||
<< endl;
|
||||
++result;
|
||||
}
|
||||
|
||||
entry++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int main( int /*argc*/, char **argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
CoderInfo coderInfo("GIF");
|
||||
if ( coderInfo.name() != string("GIF") )
|
||||
{
|
||||
cout << "Unexpected coder name \""
|
||||
<< coderInfo.name()
|
||||
<< "\""
|
||||
<< endl;
|
||||
++failures;
|
||||
}
|
||||
|
||||
if( coderInfo.description() != string("CompuServe graphics interchange format") )
|
||||
{
|
||||
cout << "Unexpected coder description \""
|
||||
<< coderInfo.description()
|
||||
<< "\""
|
||||
<< endl;
|
||||
++failures;
|
||||
}
|
||||
|
||||
failures += test(CoderInfo::AnyMatch,CoderInfo::AnyMatch,CoderInfo::AnyMatch);
|
||||
failures += test(CoderInfo::FalseMatch,CoderInfo::FalseMatch,CoderInfo::FalseMatch);
|
||||
|
||||
failures += test(CoderInfo::TrueMatch,CoderInfo::AnyMatch,CoderInfo::AnyMatch);
|
||||
failures += test(CoderInfo::FalseMatch,CoderInfo::AnyMatch,CoderInfo::AnyMatch);
|
||||
|
||||
failures += test(CoderInfo::AnyMatch,CoderInfo::TrueMatch,CoderInfo::AnyMatch);
|
||||
failures += test(CoderInfo::AnyMatch,CoderInfo::FalseMatch,CoderInfo::AnyMatch);
|
||||
|
||||
failures += test(CoderInfo::AnyMatch,CoderInfo::AnyMatch,CoderInfo::TrueMatch);
|
||||
failures += test(CoderInfo::AnyMatch,CoderInfo::AnyMatch,CoderInfo::FalseMatch);
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,154 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
//
|
||||
// Test Magick::Color classes
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char **argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
//
|
||||
// Verify conversion from named colors as well as ColorRGB constructor
|
||||
//
|
||||
|
||||
{
|
||||
struct colorStr
|
||||
{
|
||||
const char* color;
|
||||
double red;
|
||||
double green;
|
||||
double blue;
|
||||
};
|
||||
|
||||
// Convert ratios from rgb.txt via value/255
|
||||
struct colorStr colorMap [] =
|
||||
{
|
||||
{ "red", 1,0,0 },
|
||||
{ "lime", 0,1,0 },
|
||||
{ "blue", 0,0,1 },
|
||||
{ "black", 0,0,0 },
|
||||
{ "white", 1,1,1 },
|
||||
{ "cyan", 0,1,1 },
|
||||
{ "magenta", 1,0,1 },
|
||||
{ "yellow", 1,1,0 },
|
||||
{ NULL, 0,0,0 }
|
||||
};
|
||||
|
||||
for ( int i = 0; colorMap[i].color != NULL; i++ )
|
||||
{
|
||||
{
|
||||
Color color( colorMap[i].color );
|
||||
ColorRGB colorMatch( colorMap[i].red,
|
||||
colorMap[i].green,
|
||||
colorMap[i].blue );
|
||||
if ( color != colorMatch )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__ << " Color(\""
|
||||
<< colorMap[i].color << "\") is "
|
||||
<< string(color)
|
||||
<< " rather than "
|
||||
<< string(colorMatch)
|
||||
<< endl;
|
||||
// printf ("Green: %10.16f\n", color.green());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Test conversion to/from X11-style color specifications
|
||||
{
|
||||
const char * colorStrings[] =
|
||||
{
|
||||
"#ABC",
|
||||
"#AABBCC",
|
||||
"#AAAABBBBCCCC",
|
||||
NULL
|
||||
};
|
||||
|
||||
#if MAGICKCORE_QUANTUM_DEPTH == 8
|
||||
string expectedString = "#AABBCC";
|
||||
#elif MAGICKCORE_QUANTUM_DEPTH == 16
|
||||
string expectedString = "#AAAABBBBCCCC";
|
||||
#elif MAGICKCORE_QUANTUM_DEPTH == 32
|
||||
string expectedString = "#AAAAAAAABBBBBBBBCCCCCCCC";
|
||||
#elif MAGICKCORE_QUANTUM_DEPTH == 64
|
||||
string expectedString = "#AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCC";
|
||||
#else
|
||||
# error Quantum depth not supported!
|
||||
#endif
|
||||
|
||||
for ( int i = 0; colorStrings[i] != NULL; ++i )
|
||||
{
|
||||
if ( string(Color(colorStrings[i])) != expectedString )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Conversion from " << colorStrings[i]
|
||||
<< " is "
|
||||
<< string(Color(colorStrings[i])) << " rather than "
|
||||
<< expectedString
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Test ColorGray
|
||||
{
|
||||
double resolution = 1.0/QuantumRange;
|
||||
if ( resolution < 0.0000001 )
|
||||
resolution = 0.0000001;
|
||||
double max_error = resolution + MagickEpsilon;
|
||||
|
||||
for( double value = 0; value < 1.0 + MagickEpsilon; value += resolution )
|
||||
{
|
||||
ColorGray gray(value);
|
||||
if ( gray.shade() < value - max_error || gray.shade() > value + max_error )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " shade is "
|
||||
<< gray.shade()
|
||||
<< " rather than nominal "
|
||||
<< value
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2003
|
||||
//
|
||||
// Test STL colorHistogram function
|
||||
//
|
||||
|
||||
#undef USE_VECTOR
|
||||
#define USE_MAP
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#if defined(USE_VECTOR)
|
||||
# include <vector>
|
||||
# include <utility>
|
||||
#endif
|
||||
#if defined(USE_MAP)
|
||||
# include <map>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
// Read image
|
||||
Image image;
|
||||
image.read( srcdir + "test_image.miff" );
|
||||
|
||||
// Create histogram vector
|
||||
#if defined(USE_MAP)
|
||||
std::map<Color,size_t> histogram;
|
||||
#elif defined(USE_VECTOR)
|
||||
std::vector<std::pair<Color,size_t> > histogram;
|
||||
#endif
|
||||
|
||||
colorHistogram( &histogram, image );
|
||||
|
||||
// Print out histogram
|
||||
#if (MAGICKCORE_QUANTUM_DEPTH == 8)
|
||||
int quantum_width=3;
|
||||
#elif (MAGICKCORE_QUANTUM_DEPTH == 16)
|
||||
int quantum_width=5;
|
||||
#else
|
||||
int quantum_width=10;
|
||||
#endif
|
||||
|
||||
cout << "Histogram for file \"" << image.fileName() << "\"" << endl
|
||||
<< histogram.size() << " entries:" << endl;
|
||||
|
||||
#if defined(USE_MAP)
|
||||
std::map<Color,size_t>::const_iterator p=histogram.begin();
|
||||
#elif defined(USE_VECTOR)
|
||||
std::vector<std::pair<Color,size_t> >::const_iterator p=histogram.begin();
|
||||
#endif
|
||||
while (p != histogram.end())
|
||||
{
|
||||
cout << setw(10) << (int)p->second << ": ("
|
||||
<< setw(quantum_width) << (int)p->first.redQuantum() << ","
|
||||
<< setw(quantum_width) << (int)p->first.greenQuantum() << ","
|
||||
<< setw(quantum_width) << (int)p->first.blueQuantum() << ")"
|
||||
<< endl;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,102 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
|
||||
//
|
||||
// Tests for throwing exceptions
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
volatile int failures=0;
|
||||
|
||||
cout << "Checking for working exceptions (may crash) ... ";
|
||||
cout.flush();
|
||||
|
||||
{
|
||||
// Basic exception test
|
||||
try
|
||||
{
|
||||
failures++;
|
||||
throw int(100);
|
||||
}
|
||||
catch ( int /*value_*/ )
|
||||
{
|
||||
failures--;
|
||||
}
|
||||
|
||||
// Throw a Magick++ exception class.
|
||||
try
|
||||
{
|
||||
failures++;
|
||||
cout << "Throwing 'Magick::WarningResourceLimit' exception" << endl;
|
||||
cout.flush();
|
||||
throw WarningResourceLimit("How now brown cow?");
|
||||
}
|
||||
catch( Exception & /*error_*/ )
|
||||
{
|
||||
cout << "Successfully caught 'Magick::WarningResourceLimit' exception" << endl;
|
||||
cout.flush();
|
||||
failures--;
|
||||
}
|
||||
|
||||
// A more complex test
|
||||
try
|
||||
{
|
||||
size_t columns = 640;
|
||||
size_t rows = 480;
|
||||
Geometry geometry(columns,rows);
|
||||
Color canvasColor( "red" );
|
||||
Image image( geometry, canvasColor);
|
||||
|
||||
{
|
||||
try
|
||||
{
|
||||
failures++;
|
||||
cout << "Throwing library 'Magick::Exception' exception" << endl;
|
||||
cout.flush();
|
||||
image.directory();
|
||||
}
|
||||
catch ( Exception& /*error_*/ )
|
||||
{
|
||||
cout << "Successfully caught library 'Magick::Exception' exception" << endl;
|
||||
cout.flush();
|
||||
failures--;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Bogus catch: Caught exception: " << error_.what() << endl;
|
||||
cout.flush();
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Bogus catch: Caught exception: " << error_.what() << endl;
|
||||
cout.flush();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
cout.flush();
|
||||
return 1;
|
||||
}
|
||||
cout << "Exception testing passed!" << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,140 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2002, 2003
|
||||
//
|
||||
// Test STL montageImages function
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
// InitializeMagick(*argv);
|
||||
InitializeMagick("");
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Test montageImages
|
||||
//
|
||||
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "test_image_anim.miff" );
|
||||
|
||||
vector<Image> montage;
|
||||
MontageFramed montageOpts;
|
||||
|
||||
// Default montage
|
||||
montageImages( &montage, imageList.begin(), imageList.end(), montageOpts );
|
||||
|
||||
{
|
||||
Geometry targetGeometry(128, 126 );
|
||||
if ( montage[0].montageGeometry() != targetGeometry )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Montage geometry ("
|
||||
<< string(montage[0].montageGeometry())
|
||||
<< ") is incorrect (expected "
|
||||
<< string(targetGeometry)
|
||||
<< ")"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
if ( montage[0].columns() != 768 || montage[0].rows() != 504 )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Montage columns/rows ("
|
||||
<< montage[0].columns() << "x"
|
||||
<< montage[0].rows()
|
||||
<< ") incorrect. (expected 768x504)" << endl;
|
||||
}
|
||||
|
||||
// Montage with options set
|
||||
montage.clear();
|
||||
montageOpts.borderColor( "green" );
|
||||
montageOpts.borderWidth( 1 );
|
||||
montageOpts.compose( OverCompositeOp );
|
||||
montageOpts.fileName( "Montage" );
|
||||
montageOpts.frameGeometry( "6x6+3+3" );
|
||||
montageOpts.geometry("50x50+2+2>");
|
||||
montageOpts.gravity( CenterGravity );
|
||||
montageOpts.penColor( "yellow" );
|
||||
montageOpts.shadow( true );
|
||||
montageOpts.texture( "granite:" );
|
||||
montageOpts.tile("2x1");
|
||||
montageImages( &montage, imageList.begin(), imageList.end(), montageOpts );
|
||||
|
||||
if ( montage.size() != 3 )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Montage images failed, number of montage frames is "
|
||||
<< montage.size()
|
||||
<< " rather than 3 as expected." << endl;
|
||||
}
|
||||
|
||||
{
|
||||
Geometry targetGeometry( 66, 70 );
|
||||
if ( montage[0].montageGeometry() != targetGeometry )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Montage geometry ("
|
||||
<< string(montage[0].montageGeometry())
|
||||
<< ") is incorrect (expected "
|
||||
<< string(targetGeometry)
|
||||
<< ")."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
if ( montage[0].columns() != 136 || montage[0].rows() != 70 )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Montage columns/rows ("
|
||||
<< montage[0].columns() << "x"
|
||||
<< montage[0].rows()
|
||||
<< ") incorrect. (expected 136x70)" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,71 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2003
|
||||
//
|
||||
// Test STL morphImages function
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main( int /*argc*/, char **argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try {
|
||||
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Test morphImages
|
||||
//
|
||||
|
||||
list<Image> imageList;
|
||||
readImages( &imageList, srcdir + "test_image_anim.miff" );
|
||||
|
||||
list<Image> morphed;
|
||||
morphImages( &morphed, imageList.begin(), imageList.end(), 3 );
|
||||
|
||||
if ( morphed.size() != 21 )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Morph images failed, number of frames is "
|
||||
<< morphed.size()
|
||||
<< " rather than 21 as expected." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,255 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2003
|
||||
//
|
||||
// Test reading/writing BLOBs using Magick++
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#if defined(MISSING_STD_IOS_BINARY)
|
||||
# define IOS_IN_BINARY ios::in
|
||||
#else
|
||||
# define IOS_IN_BINARY ios::in | ios::binary
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
// A derived Blob class to exercise updateNoCopy()
|
||||
class myBlob : public Blob
|
||||
{
|
||||
public:
|
||||
// Construct from open binary stream
|
||||
myBlob( ifstream &stream_ )
|
||||
: Blob()
|
||||
{
|
||||
unsigned char* blobData = new unsigned char[100000];
|
||||
char* c= reinterpret_cast<char *>(blobData);
|
||||
size_t blobLen=0;
|
||||
while( (blobLen< 100000) && stream_.get(*c) )
|
||||
{
|
||||
c++;
|
||||
blobLen++;
|
||||
}
|
||||
if ((!stream_.eof()) || (blobLen == 0))
|
||||
{
|
||||
cout << "Failed to stream into blob!" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Insert data into blob
|
||||
updateNoCopy( reinterpret_cast<unsigned char*>(blobData), blobLen,
|
||||
Blob::NewAllocator );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int main( int /*argc*/, char ** argv)
|
||||
{
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
int failures=0;
|
||||
|
||||
try
|
||||
{
|
||||
string srcdir("");
|
||||
if(getenv("SRCDIR") != 0)
|
||||
srcdir = getenv("SRCDIR");
|
||||
|
||||
string testimage;
|
||||
|
||||
//
|
||||
// Test reading BLOBs
|
||||
//
|
||||
{
|
||||
string signature("");
|
||||
{
|
||||
Image image(srcdir + "test_image.miff");
|
||||
signature = image.signature();
|
||||
}
|
||||
|
||||
// Read raw data from file into BLOB
|
||||
testimage = srcdir + "test_image.miff";
|
||||
ifstream in( testimage.c_str(), ios::in | IOS_IN_BINARY );
|
||||
if( !in )
|
||||
{
|
||||
cout << "Failed to open file " << testimage << " for input!" << endl;
|
||||
exit(1);
|
||||
}
|
||||
unsigned char* blobData = new unsigned char[100000];
|
||||
char* c=reinterpret_cast<char *>(blobData);
|
||||
size_t blobLen=0;
|
||||
while( (blobLen< 100000) && in.get(*c) )
|
||||
{
|
||||
c++;
|
||||
blobLen++;
|
||||
}
|
||||
if ((!in.eof()) || (blobLen == 0))
|
||||
{
|
||||
cout << "Failed to read file " << testimage << " for input!" << endl;
|
||||
exit(1);
|
||||
}
|
||||
in.close();
|
||||
|
||||
// Construct Magick++ Blob
|
||||
Blob blob(static_cast<const unsigned char*>(blobData), blobLen);
|
||||
delete [] blobData;
|
||||
|
||||
// If construction of image fails, an exception should be thrown
|
||||
{
|
||||
// Construct with blob data only
|
||||
Image image( blob );
|
||||
if ( image.signature() != signature )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image signature "
|
||||
<< image.signature()
|
||||
<< " != "
|
||||
<< signature << endl;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Construct with image geometry and blob data
|
||||
Image image( blob, Geometry(148,99));
|
||||
if ( image.signature() != signature )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image signature "
|
||||
<< image.signature()
|
||||
<< " != "
|
||||
<< signature << endl;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Construct default image, and then read in blob data
|
||||
Image image;
|
||||
image.read( blob );
|
||||
if ( image.signature() != signature )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image signature "
|
||||
<< image.signature()
|
||||
<< " != "
|
||||
<< signature << endl;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Construct default image, and then read in blob data with
|
||||
// image geometry
|
||||
Image image;
|
||||
image.read( blob, Geometry(148,99) );
|
||||
if ( image.signature() != signature )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image signature "
|
||||
<< image.signature()
|
||||
<< " != "
|
||||
<< signature << endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Test writing BLOBs
|
||||
{
|
||||
Blob blob;
|
||||
string signature("");
|
||||
{
|
||||
Image image(srcdir + "test_image.miff");
|
||||
image.magick("MIFF");
|
||||
image.write( &blob );
|
||||
signature = image.signature();
|
||||
}
|
||||
{
|
||||
Image image(blob);
|
||||
if ( image.signature() != signature )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image signature "
|
||||
<< image.signature()
|
||||
<< " != "
|
||||
<< signature << endl;
|
||||
image.display();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Test writing BLOBs via STL writeImages
|
||||
{
|
||||
Blob blob;
|
||||
|
||||
list<Image> first;
|
||||
readImages( &first, srcdir + "test_image_anim.miff" );
|
||||
writeImages( first.begin(), first.end(), &blob, true );
|
||||
}
|
||||
|
||||
// Test constructing a BLOB from a derived class
|
||||
{
|
||||
|
||||
string signature("");
|
||||
{
|
||||
Image image(srcdir + "test_image.miff");
|
||||
signature = image.signature();
|
||||
}
|
||||
|
||||
// Read raw data from file into BLOB
|
||||
testimage = srcdir + "test_image.miff";
|
||||
ifstream in( testimage.c_str(), ios::in | IOS_IN_BINARY );
|
||||
if( !in )
|
||||
{
|
||||
cout << "Failed to open file for input!" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
myBlob blob( in );
|
||||
in.close();
|
||||
|
||||
Image image( blob );
|
||||
if ( image.signature() != signature )
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image signature "
|
||||
<< image.signature()
|
||||
<< " != "
|
||||
<< signature << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch( Exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch( exception &error_ )
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( failures )
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,178 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2003
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// Test STL readImages and writeImages functions and test
|
||||
// image format when reading/writing.
|
||||
//
|
||||
|
||||
#include <Magick++.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
using namespace Magick;
|
||||
|
||||
int main(int,char ** argv)
|
||||
{
|
||||
int
|
||||
failures=0;
|
||||
|
||||
string
|
||||
srcdir("");
|
||||
|
||||
|
||||
// Initialize ImageMagick install location for Windows
|
||||
InitializeMagick(*argv);
|
||||
|
||||
try
|
||||
{
|
||||
if (getenv("SRCDIR") != 0)
|
||||
srcdir=getenv("SRCDIR");
|
||||
|
||||
//
|
||||
// Test readImages and writeImages
|
||||
//
|
||||
list<Image> first;
|
||||
readImages(&first,srcdir + "test_image_anim.miff");
|
||||
|
||||
if (first.size() != 6)
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Read images failed, number of frames is "
|
||||
<< first.size()
|
||||
<< " rather than 6 as expected." << endl;
|
||||
}
|
||||
|
||||
writeImages(first.begin(),first.end(),"testmagick_anim_out.miff");
|
||||
|
||||
list<Image> second;
|
||||
readImages(&second,"testmagick_anim_out.miff");
|
||||
|
||||
list<Image>::iterator firstIter = first.begin();
|
||||
list<Image>::iterator secondIter = second.begin();
|
||||
while (firstIter != first.end() && secondIter != second.end())
|
||||
{
|
||||
if (firstIter->scene() != secondIter->scene())
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image scene: " << secondIter->scene()
|
||||
<< " is not equal to original "
|
||||
<< firstIter->scene()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (firstIter->rows() != secondIter->rows())
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image rows " << secondIter->rows()
|
||||
<< " are not equal to original "
|
||||
<< firstIter->rows()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (firstIter->columns() != secondIter->columns())
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image columns " << secondIter->columns()
|
||||
<< " are not equal to original "
|
||||
<< firstIter->rows()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
firstIter++;
|
||||
secondIter++;
|
||||
}
|
||||
|
||||
Image third(*first.begin());
|
||||
third.write("testmagick_anim_out");
|
||||
|
||||
Image fourth;
|
||||
fourth.read("testmagick_anim_out");
|
||||
|
||||
if (fourth.magick() != "MIFF")
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image magick: " << fourth.magick()
|
||||
<< " is not equal to MIFF"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
third.write("testmagick_anim_out.ico");
|
||||
fourth.read("testmagick_anim_out.ico");
|
||||
|
||||
if (fourth.magick() != "ICO")
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image magick: " << fourth.magick()
|
||||
<< " is not equal to ICO"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
third.magick("BMP");
|
||||
third.write("testmagick_anim_out.ico");
|
||||
fourth.read("testmagick_anim_out.ico");
|
||||
|
||||
if (fourth.magick() != "BMP")
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image magick: " << fourth.magick()
|
||||
<< " is not equal to BMP"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
third.write("PDB:testmagick_anim_out.ico");
|
||||
fourth.read("testmagick_anim_out.ico");
|
||||
|
||||
if (fourth.magick() != "PDB")
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image magick: " << fourth.magick()
|
||||
<< " is not equal to PDB"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
third.magick("");
|
||||
third.write("testmagick_anim_out.ico");
|
||||
fourth.read("testmagick_anim_out.ico");
|
||||
|
||||
if (fourth.magick() != "ICO")
|
||||
{
|
||||
++failures;
|
||||
cout << "Line: " << __LINE__
|
||||
<< " Image magick: " << fourth.magick()
|
||||
<< " is not equal to ICO"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
catch(Exception &error_)
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
catch(exception &error_)
|
||||
{
|
||||
cout << "Caught exception: " << error_.what() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (failures)
|
||||
{
|
||||
cout << failures << " failures" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2004 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||
#
|
||||
# This file is part of Magick++, the C++ API for ImageMagick and
|
||||
# ImageMagick. Please see the file "COPYING" included with Magick++
|
||||
# for usage and copying restrictions.
|
||||
#
|
||||
subdir=Magick++/tests
|
||||
. ./common.shi
|
||||
echo "1..12"
|
||||
|
||||
SRCDIR=${top_srcdir}/${subdir}/
|
||||
export SRCDIR
|
||||
|
||||
cd ${subdir} || exit 1
|
||||
|
||||
for mytest in appendImages attributes averageImages coalesceImages coderInfo color colorHistogram exceptions montageImages morphImages readWriteBlob readWriteImages
|
||||
do
|
||||
./${mytest} && echo "ok" || echo "not ok"
|
||||
done
|
||||
:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue