Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f870df2a16 | |||
| 47417e1175 | |||
| 84a8287bf9 | |||
| 0bbd78a9a9 | |||
| fbe2b8a7e8 | |||
| 743ee4be1f | |||
| 4c161b0526 | |||
| 6edb46cc86 | |||
| 8166dfa42f | |||
| 754c5a0d2e | |||
| 7c96c474ee | |||
| f297d9d846 | |||
| 3ca3ef2685 | |||
| a0b4219cad | |||
| a344259e40 | |||
| 1bf543ec00 | |||
| e60a7db6df | |||
| 8c96238db7 | |||
| f2762d6633 | |||
| 930b90c258 | |||
| e325062915 | |||
| 197c100c01 | |||
| d86b4852f9 | |||
| d255172a62 | |||
| c4a16a1386 | |||
| 248cd28ba9 | |||
| 1e37a7a134 | |||
| 5d96462b49 | |||
| 86eeb2c0cf |
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
.DS_Store
|
||||
48
CHANGELOG.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file. Older changes are summarized on individual commits.
|
||||
|
||||
## [0.8.1.0]
|
||||
- Mitigate parallel crash by passing "-j" flag
|
||||
- Revamp parallel preferences
|
||||
|
||||
## [0.8.0.2]
|
||||
- Tweaks to directory and bundle icons
|
||||
- Switch from qltool to iff
|
||||
- Output redirection fixes
|
||||
- Thumbnail bindings
|
||||
- "Add to existing" prefs option
|
||||
- Fixed a fid bug introduced in 0.8.0.0
|
||||
|
||||
## [0.8.0.1]
|
||||
- Move batchfile generation to Prescan
|
||||
- Rewrite batchfile generation (batch now handles files, links, dirs)
|
||||
- Rewrite spotlight and move to batch
|
||||
- Replace directory previews with flacdiricon tool
|
||||
|
||||
## [0.8.0.0]
|
||||
- Refactor for thumb/icon "modes"
|
||||
- Integrate ql-icon
|
||||
- flacfile shell tool
|
||||
- Move more operations into helper
|
||||
- "Open in browser" postflight
|
||||
- Clean up prefs
|
||||
- Better logic for external tools (sips can be disabled manually)
|
||||
|
||||
## [0.7.13.2]
|
||||
- Added PHP extension checks
|
||||
- Moved icon, thumb, meta, contents into helper
|
||||
- Fixed numerous bugs in helper
|
||||
- Parallel option in prefs
|
||||
- Debug messaging and console
|
||||
- Set WAL on dbp for performance
|
||||
|
||||
## [0.7.13.1]
|
||||
- Thumb creation bugfix
|
||||
- App filepath bugfixes
|
||||
- Switch to shell wrapper (to enable php bundling)
|
||||
|
||||
## [0.7.13.0]
|
||||
- Rewrites to diskutil code
|
||||
- Rewrites to mdutil code
|
||||
- Restructure paths
|
||||
- Fixed a sort order bug in rtc.php
|
||||
65
Console/Console.platypus
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AcceptsFiles</key>
|
||||
<false/>
|
||||
<key>AcceptsText</key>
|
||||
<false/>
|
||||
<key>Authentication</key>
|
||||
<false/>
|
||||
<key>Author</key>
|
||||
<string>profiteroles</string>
|
||||
<key>BundledFiles</key>
|
||||
<array/>
|
||||
<key>Creator</key>
|
||||
<string>Platypus-5.2</string>
|
||||
<key>DeclareService</key>
|
||||
<false/>
|
||||
<key>DevelopmentVersion</key>
|
||||
<false/>
|
||||
<key>Droppable</key>
|
||||
<false/>
|
||||
<key>IconPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/Console/icon.icns</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.profiteroles.Console</string>
|
||||
<key>InterfaceType</key>
|
||||
<string>Text Window</string>
|
||||
<key>InterpreterPath</key>
|
||||
<string>/bin/bash</string>
|
||||
<key>Name</key>
|
||||
<string>Console</string>
|
||||
<key>NibPath</key>
|
||||
<string>/usr/local/share/platypus/MainMenu.nib</string>
|
||||
<key>OptimizeApplication</key>
|
||||
<true/>
|
||||
<key>Overwrite</key>
|
||||
<false/>
|
||||
<key>PromptForFileOnLaunch</key>
|
||||
<false/>
|
||||
<key>RemainRunning</key>
|
||||
<false/>
|
||||
<key>RunInBackground</key>
|
||||
<true/>
|
||||
<key>ScriptPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/Console/tail.sh</string>
|
||||
<key>TextBackground</key>
|
||||
<string>#23030e</string>
|
||||
<key>TextFont</key>
|
||||
<string>SFMono-Regular</string>
|
||||
<key>TextForeground</key>
|
||||
<string>#ffc3bd</string>
|
||||
<key>TextSize</key>
|
||||
<real>11</real>
|
||||
<key>UniformTypes</key>
|
||||
<array>
|
||||
<string>public.item</string>
|
||||
<string>public.folder</string>
|
||||
</array>
|
||||
<key>UseXMLPlistFormat</key>
|
||||
<false/>
|
||||
<key>Version</key>
|
||||
<string>0.1.0.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Console/icon.icns
Normal file
3
Console/tail.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
tail -F $1
|
||||
14
MainMenu.nib/designable.nib
generated
@@ -55,7 +55,7 @@
|
||||
<rect key="contentRect" x="472" y="537" width="600" height="83"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
|
||||
<value key="minSize" type="size" width="600" height="83"/>
|
||||
<value key="maxSize" type="size" width="1200" height="83"/>
|
||||
<value key="maxSize" type="size" width="1800" height="83"/>
|
||||
<view key="contentView" id="2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="83"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
@@ -163,8 +163,7 @@ Gw
|
||||
<action selector="menuItemSelected:" target="207" id="x6l-Tq-pHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check for Updates..." id="jWa-5b-mBK" userLabel="Check for updates...">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menuItem title="Check for Updates..." keyEquivalent="u" id="jWa-5b-mBK" userLabel="Check for updates...">
|
||||
<connections>
|
||||
<action selector="menuItemSelected:" target="207" id="VBb-a8-Cku"/>
|
||||
</connections>
|
||||
@@ -488,10 +487,15 @@ Gw
|
||||
<menuItem title="Window" id="19">
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="24">
|
||||
<items>
|
||||
<menuItem title="Zoom" keyEquivalent="z" id="197">
|
||||
<menuItem title="Console" keyEquivalent="0" id="ZMj-KE-Xmg">
|
||||
<connections>
|
||||
<action selector="menuItemSelected:" target="207" id="uTf-9L-ThU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" keyEquivalent="z" id="bf1-wK-fgP">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="198"/>
|
||||
<action selector="performZoom:" target="-1" id="xLL-JF-YCG"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="23">
|
||||
|
||||
BIN
MainMenu.nib/keyedobjects.nib
generated
16
README.md
@@ -1,10 +1,10 @@
|
||||
<img align="left" src="https://www.profiteroles.org/assets/yuba.png" style="float: left; margin-right: 30px;" width="120">
|
||||
<img align='left' src='icon.iconset/icon_512x512.png' width='128'>
|
||||
|
||||
# Yuba
|
||||
|
||||
**Yuba** generates a web-browsable SQLite database from an HFS+ filesystem. Its client application gathers forensic-quality data about a locally attached disk, properly interpreting bundles, reading Spotlight data, Finder flags, labels, and other contextual information. It can generate hashes, thumbnails, and gather 3rd party metadata with exiftool and mediainfo. Yuba's filesystem catalogues are comprehensive, lightweight, optimized for massive (1 million+) trees, and reflect incremental changes to contents and metadata. A server-side PHP script is provided, which allows familiar, Finder-style browsing of a catalogue.
|
||||
**Yuba** generates web-browsable catalogues from locally attached HFS+ filesystems. Its client application gathers forensic-quality data about a volume, properly interpreting bundles, reading Spotlight data, Finder flags, labels, and other contextual information. It can generate hashes, thumbnails, and gather 3rd party metadata with exiftool and mediainfo. Yuba's SQLite catalogues are comprehensive, lightweight, optimized for massive (1 million+) trees, and reflect incremental changes to contents and metadata. A server-side PHP script is provided, which allows familiar, Finder-style browsing of a catalogue.
|
||||
|
||||
* **⇩ [Download Yuba 0.7.12.7](https://www.profiteroles.org/downloads/Yuba_0.7.12.7.zip)**
|
||||
####[⇩ Download Yuba 0.8.1.0](https://git1.profiteroles.org/p/Yuba/raw/master/Yuba.app.zip) ([Changelog](CHANGELOG.md))
|
||||
|
||||
## Features
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
|
||||
## Screenshots
|
||||
|
||||
<img src="https://www.profiteroles.org/assets/yuba_progress.png" width="600">
|
||||
<img src="https://www.profiteroles.org/assets/yuba_browser_1.png" width="1100">
|
||||
<img src="https://www.profiteroles.org/assets/yuba_browser_2.png" width="1100">
|
||||
<img src='screenshot_1.png' width='977'>
|
||||
<img src='screenshot_2.png' width='1779'>
|
||||
<img src='screenshot_3.png' width='1779'>
|
||||
|
||||
## Notes
|
||||
|
||||
Running Yuba requires disabling Gatekeeper by running `sudo spctl --master-disable` in the Terminal.
|
||||
Running Yuba may require disabling Gatekeeper by running `sudo spctl --master-disable` in the Terminal.
|
||||
|
||||
## Building from source
|
||||
|
||||
Building Yuba requires Platypus and Pashua
|
||||
|
||||
* https://github.com/sveinbjornt/Platypus
|
||||
* https://github.com/BlueM/Pashua
|
||||
* https://github.com/BlueM/Pashua
|
||||
|
||||
BIN
bin/ffmpeg → Tester.zip
Executable file → Normal file
68
Tester/IconTester.platypus
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AcceptsFiles</key>
|
||||
<true/>
|
||||
<key>AcceptsText</key>
|
||||
<false/>
|
||||
<key>Authentication</key>
|
||||
<false/>
|
||||
<key>Author</key>
|
||||
<string>profiteroles</string>
|
||||
<key>BundledFiles</key>
|
||||
<array>
|
||||
<string>/Volumes/Code/Yuba/bin</string>
|
||||
</array>
|
||||
<key>Creator</key>
|
||||
<string>Platypus-5.3</string>
|
||||
<key>DeclareService</key>
|
||||
<false/>
|
||||
<key>DevelopmentVersion</key>
|
||||
<false/>
|
||||
<key>Droppable</key>
|
||||
<true/>
|
||||
<key>IconPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/Tester/icon.icns</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.profiteroles.IconTester</string>
|
||||
<key>InterfaceType</key>
|
||||
<string>Text Window</string>
|
||||
<key>InterpreterPath</key>
|
||||
<string>/usr/bin/php</string>
|
||||
<key>Name</key>
|
||||
<string>IconTester</string>
|
||||
<key>NibPath</key>
|
||||
<string>/usr/local/share/platypus/MainMenu.nib</string>
|
||||
<key>OptimizeApplication</key>
|
||||
<true/>
|
||||
<key>Overwrite</key>
|
||||
<false/>
|
||||
<key>PromptForFileOnLaunch</key>
|
||||
<false/>
|
||||
<key>RemainRunning</key>
|
||||
<true/>
|
||||
<key>RunInBackground</key>
|
||||
<false/>
|
||||
<key>ScriptArgs</key>
|
||||
<array>
|
||||
<string>icon</string>
|
||||
</array>
|
||||
<key>ScriptPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/Tester/Tester.php</string>
|
||||
<key>TextBackground</key>
|
||||
<string>#ffffff</string>
|
||||
<key>TextFont</key>
|
||||
<string>Monaco</string>
|
||||
<key>TextForeground</key>
|
||||
<string>#000000</string>
|
||||
<key>TextSize</key>
|
||||
<real>13</real>
|
||||
<key>UniformTypes</key>
|
||||
<array>
|
||||
<string>public.item</string>
|
||||
</array>
|
||||
<key>Version</key>
|
||||
<string>0.0.0.1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
86
utils/ThumbTester.app/Contents/Resources/script → Tester/Tester.php
Executable file → Normal file
@@ -1,25 +1,26 @@
|
||||
<?
|
||||
|
||||
// Yuba Preview Tester 0.1.4
|
||||
// Yuba Preview Tester 0.1.6
|
||||
|
||||
//print_r($argv); die;
|
||||
//print_r($argv);
|
||||
|
||||
$mode = $argv[1];
|
||||
|
||||
if (empty($argv[2])) { echo "Nothing dragged"; die; }
|
||||
|
||||
// Bundled tools
|
||||
$bin_gfi = __DIR__."/bin/GetFileInfo";
|
||||
$bin_mediainfo = __DIR__."/bin/mediainfo";
|
||||
$bin_exiftool = __DIR__."/bin/exiftool";
|
||||
$bin_ffmpeg = __DIR__."/bin/ffmpeg";
|
||||
$bin_qlthumb = __DIR__."/bin/ql-thumbnail";
|
||||
$bin_qlicon = __DIR__."/bin/ql-icon";
|
||||
$bin_qlicon = __DIR__."/bin/ql-icon_old";
|
||||
$bin_qltool = __DIR__."/bin/qltool";
|
||||
$bin_sox = __DIR__."/bin/sox";
|
||||
$bin_pngcrush = __DIR__."/bin/pngcrush";
|
||||
$bin_pngquant = __DIR__."/bin/pngquant";
|
||||
$bin_parallel = __DIR__."/bin/parallel";
|
||||
$bin_convert = __DIR__."/bin/convert";
|
||||
|
||||
$bin_zqlicon = __DIR__."/bin/ql-icon";
|
||||
$bin_zicon = __DIR__."/bin/iff";
|
||||
|
||||
// System tools
|
||||
$bin_php = "php";
|
||||
@@ -27,22 +28,28 @@ $bin_qlmanage = "qlmanage";
|
||||
$bin_sips = "sips";
|
||||
|
||||
// External tools
|
||||
$bin_convert = "/opt/local/bin/convert";
|
||||
$bin_vips = "/opt/local/bin/vipsthumbnail";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (empty(shell_exec("which ".$bin_vips))) { echo "Binary not found: ".$bin_vips."\n"; }
|
||||
|
||||
if (empty($argv[2])) { echo "Nothing dragged"; die; }
|
||||
|
||||
$p['icon_size'] = 512;
|
||||
$p['thumb_size'] = 1024;
|
||||
|
||||
$shellpath = escapeshellarg($argv[2]);
|
||||
$tprefix = "/tmp/".md5($shellpath.time())."/";
|
||||
$wprefix = "/tmp/".md5($shellpath.time())."_work/";
|
||||
mkdir($tprefix);
|
||||
mkdir($wprefix);
|
||||
$tprefix = "/tmp/tester/".md5($shellpath.time())."/";
|
||||
$wprefix = "/tmp/tester/".md5($shellpath.time())."_work/";
|
||||
mkdir($tprefix,0777,true);
|
||||
mkdir($wprefix,0777,true);
|
||||
|
||||
if ($mode == "thumb") {
|
||||
|
||||
$cmd['ql-thumbnail'][] = $bin_qlthumb." ".$shellpath." ".$tprefix."ql-thumbnail.jpg public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8";
|
||||
$cmd['ql-thumbnail'][] = $tprefix."ql-thumbnail.jpg";
|
||||
|
||||
$cmd['sips'][] = $bin_sips." -s format jpeg -s formatOptions 80 -Z ".$p['thumb_size']." ".$shellpath." --out ".$tprefix."sips.jpg"; // add ?? "-d profile --deleteColorManagementProperties"
|
||||
$cmd['sips'][] = $tprefix."sips.jpg";
|
||||
|
||||
@@ -58,12 +65,23 @@ if ($mode == "thumb") {
|
||||
$cmd['qlmanage'][] = $bin_qlmanage." -t -s ".$p['thumb_size']." -o ".$wprefix." ".$shellpath." ; mv ".escapeshellarg($wprefix.basename($argv[2]).".png")." ".$tprefix."qlmanage.png";
|
||||
$cmd['qlmanage'][] = $tprefix."qlmanage.png";
|
||||
|
||||
$cmd['ql-thumbnail'][] = $bin_qlthumb." ".$shellpath." ".$tprefix."qlthumb.jpg public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8";
|
||||
$cmd['ql-thumbnail'][] = $tprefix."qlthumb.jpg";
|
||||
$cmd['sox_q'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o - | ".$bin_pngquant." - -o ".$tprefix."sox-quant.png";
|
||||
$cmd['sox_q'][] = $tprefix."sox-quant.png";
|
||||
|
||||
$cmd['sox'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o - | ".$bin_convert." - -crop 800x515+58+30 +dither -colors 16 ".$tprefix."sox.png";
|
||||
//$cmd['sox'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o ".$tpfile."; ".$bin_sips." -s format jpeg -s formatOptions 80 ".escapeshellarg($tpfile)." --out ".$tprefix."sox.png";
|
||||
$cmd['sox'][] = $tprefix."sox.png";
|
||||
$cmd['sox_c'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o - | ".$bin_convert." - -quality 85% ".$tprefix."sox-convert.jpg";
|
||||
$cmd['sox_c'][] = $tprefix."sox-convert.jpg";
|
||||
|
||||
$cmd['sox_cx'][] = $bin_sox." ".$shellpath." -n remix - trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/20}') spectrogram -r -o - | ".$bin_convert." - -quality 85% ".$tprefix."sox-convert_x.jpg";
|
||||
$cmd['sox_cx'][] = $tprefix."sox-convert_x.jpg";
|
||||
|
||||
$cmd['sox_cy'][] = $bin_sox." ".$shellpath." -n remix - trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/4}') spectrogram -r -o - | ".$bin_convert." - -quality 85% ".$tprefix."sox-convert_y.jpg";
|
||||
$cmd['sox_cy'][] = $tprefix."sox-convert_y.jpg";
|
||||
|
||||
$cmd['sox_cz'][] = $bin_sox." ".$shellpath." -n remix - spectrogram -r -o - | ".$bin_convert." - -quality 85% ".$tprefix."sox-convert_all.jpg";
|
||||
$cmd['sox_cz'][] = $tprefix."sox-convert_all.jpg";
|
||||
|
||||
$cmd['sox_s'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o ".escapeshellarg($wprefix.basename($argv[2]).".png")."; ".$bin_sips." -s format jpeg -s formatOptions 80 ".escapeshellarg($wprefix.basename($argv[2]).".png")." --out ".$tprefix."sox-sips.jpg";
|
||||
$cmd['sox_s'][] = $tprefix."sox-sips.jpg";
|
||||
|
||||
$cmd['ffmpeg'][] = $bin_ffmpeg." -ss $(( $(".$bin_mediainfo." --Inform='Video;%Duration%' ".$shellpath." | cut -d'.' -f1) / 10000 )) -i ".$shellpath." -vframes 1 -filter:v scale='".$p['thumb_size'].":-2' -q:v 3 ".$tprefix."ffmpeg.jpg"; // only works properly on horizontal videos
|
||||
$cmd['ffmpeg'][] = $tprefix."ffmpeg.jpg";
|
||||
@@ -73,20 +91,32 @@ if ($mode == "thumb") {
|
||||
$cmd['qltool'][] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% -strip -define png:compression-level=9 ".$tprefix."qltool.png";
|
||||
$cmd['qltool'][] = $tprefix."qltool.png";
|
||||
|
||||
$cmd['ql-icon'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."qlicon.png";
|
||||
$cmd['ql-icon'][] = $tprefix."qlicon.png";
|
||||
$cmd['zicon'][] = $bin_zicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zicon.png";
|
||||
$cmd['zicon'][] = $tprefix."zicon.png";
|
||||
|
||||
$cmd['ql-icon_q'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." | ".$bin_pngquant." - > ".$tprefix."qlicon-quant.png";
|
||||
$cmd['ql-icon_q'][] = $tprefix."qlicon-quant.png";
|
||||
$cmd['qltool_q'][] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% - | ".$bin_pngquant." - -o ".$tprefix."qltool_quant.png";
|
||||
$cmd['qltool_q'][] = $tprefix."qltool_quant.png";
|
||||
|
||||
$cmd['qlmanage_sx'][] = $bin_qlmanage." -ti -s ".$p['icon_size']." -o ".$wprefix." ".$shellpath." ; mv ".escapeshellarg($wprefix.basename($argv[2]).".png")." ".$tprefix."qlmanage-size.png";
|
||||
$cmd['qlmanage_sx'][] = $tprefix."qlmanage-size.png";
|
||||
$cmd['zql-icon'][] = $bin_zqlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-icon.png";
|
||||
$cmd['zql-icon'][] = $tprefix."zql-icon.png";
|
||||
|
||||
$cmd['qlmanage_fx'][] = $bin_qlmanage." -ti -f ".floor($p['icon_size']/128)." -o ".$wprefix." ".$shellpath." ; mv ".escapeshellarg($wprefix.basename($argv[2]).".png")." ".$tprefix."qlmanage-multiplier.png";
|
||||
$cmd['qlmanage_fx'][] = $tprefix."qlmanage-multiplier.png";
|
||||
$cmd['zql-iconj'][] = $bin_zqlicon." --input=".$shellpath." --type=public.jpeg --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-iconj.jpg";
|
||||
$cmd['zql-iconj'][] = $tprefix."zql-iconj.jpg";
|
||||
|
||||
$cmd['qlmanage_zx'][] = $bin_qlmanage." -ti -F ".floor($p['icon_size']/64)." -o ".$wprefix." ".$shellpath." ; sips -z ".$p['icon_size']." ".$p['icon_size']." ".escapeshellarg($wprefix.basename($argv[2]).".png")." --out ".$tprefix."qlmanage-multiplier_large.png";
|
||||
$cmd['qlmanage_zx'][] = $tprefix."qlmanage-multiplier_large.png";
|
||||
$cmd['ql-icon'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."ql-icon.png";
|
||||
$cmd['ql-icon'][] = $tprefix."ql-icon.png";
|
||||
|
||||
$cmd['ql-icon_q'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." | ".$bin_pngquant." - -o ".$tprefix."ql-icon_quant.png";
|
||||
$cmd['ql-icon_q'][] = $tprefix."ql-icon_quant.png";
|
||||
|
||||
$cmd['qlmanage_sx'][] = $bin_qlmanage." -ti -s ".$p['icon_size']." -o ".$wprefix." ".$shellpath." ; mv ".escapeshellarg($wprefix.basename($argv[2]).".png")." ".$tprefix."qlmanage_size.png";
|
||||
$cmd['qlmanage_sx'][] = $tprefix."qlmanage_size.png";
|
||||
|
||||
$cmd['qlmanage_fx'][] = $bin_qlmanage." -ti -f ".floor($p['icon_size']/128)." -o ".$wprefix." ".$shellpath." ; mv ".escapeshellarg($wprefix.basename($argv[2]).".png")." ".$tprefix."qlmanage_multiplier.png";
|
||||
$cmd['qlmanage_fx'][] = $tprefix."qlmanage_multiplier.png";
|
||||
|
||||
$cmd['qlmanage_zx'][] = $bin_qlmanage." -ti -F ".floor($p['icon_size']/64)." -o ".$wprefix." ".$shellpath." ; sips -z ".$p['icon_size']." ".$p['icon_size']." ".escapeshellarg($wprefix.basename($argv[2]).".png")." --out ".$tprefix."qlmanage_multiplierlarge.png";
|
||||
$cmd['qlmanage_zx'][] = $tprefix."qlmanage_multiplierlarge.png";
|
||||
|
||||
}
|
||||
|
||||
@@ -96,7 +126,7 @@ foreach ($cmd as $exec) {
|
||||
$start = microtime(true);
|
||||
echo $exec[0]."\n";
|
||||
shell_exec($exec[0]);
|
||||
$elapsed = substr((microtime(true)-$start),2,3);
|
||||
$elapsed = substr((microtime(true)-$start),0,4);
|
||||
|
||||
$ext = pathinfo($exec[1], PATHINFO_EXTENSION);
|
||||
$file = pathinfo($exec[1], PATHINFO_FILENAME);
|
||||
@@ -104,6 +134,7 @@ foreach ($cmd as $exec) {
|
||||
|
||||
if(!filesize($exec[1])) {
|
||||
echo "NO RESULT\n";
|
||||
unlink($exec[1]);
|
||||
} else {
|
||||
rename($exec[1],$dir."/".$i."_".$file."_".$elapsed."msec.".$ext);
|
||||
}
|
||||
@@ -112,5 +143,6 @@ foreach ($cmd as $exec) {
|
||||
}
|
||||
|
||||
shell_exec("qlmanage -p ".$tprefix."/* > /dev/null 2>&1");
|
||||
shell_exec("open ".$tprefix);
|
||||
|
||||
?>
|
||||
68
Tester/ThumbTester.platypus
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AcceptsFiles</key>
|
||||
<true/>
|
||||
<key>AcceptsText</key>
|
||||
<false/>
|
||||
<key>Authentication</key>
|
||||
<false/>
|
||||
<key>Author</key>
|
||||
<string>profiteroles</string>
|
||||
<key>BundledFiles</key>
|
||||
<array>
|
||||
<string>/Volumes/Code/Yuba/bin</string>
|
||||
</array>
|
||||
<key>Creator</key>
|
||||
<string>Platypus-5.3</string>
|
||||
<key>DeclareService</key>
|
||||
<false/>
|
||||
<key>DevelopmentVersion</key>
|
||||
<false/>
|
||||
<key>Droppable</key>
|
||||
<true/>
|
||||
<key>IconPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/Tester/icon.icns</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.profiteroles.ThumbTester</string>
|
||||
<key>InterfaceType</key>
|
||||
<string>Text Window</string>
|
||||
<key>InterpreterPath</key>
|
||||
<string>/usr/bin/php</string>
|
||||
<key>Name</key>
|
||||
<string>ThumbTester</string>
|
||||
<key>NibPath</key>
|
||||
<string>/usr/local/share/platypus/MainMenu.nib</string>
|
||||
<key>OptimizeApplication</key>
|
||||
<true/>
|
||||
<key>Overwrite</key>
|
||||
<false/>
|
||||
<key>PromptForFileOnLaunch</key>
|
||||
<false/>
|
||||
<key>RemainRunning</key>
|
||||
<true/>
|
||||
<key>RunInBackground</key>
|
||||
<false/>
|
||||
<key>ScriptArgs</key>
|
||||
<array>
|
||||
<string>thumb</string>
|
||||
</array>
|
||||
<key>ScriptPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/Tester/Tester.php</string>
|
||||
<key>TextBackground</key>
|
||||
<string>#ffffff</string>
|
||||
<key>TextFont</key>
|
||||
<string>Monaco</string>
|
||||
<key>TextForeground</key>
|
||||
<string>#000000</string>
|
||||
<key>TextSize</key>
|
||||
<real>13</real>
|
||||
<key>UniformTypes</key>
|
||||
<array>
|
||||
<string>public.item</string>
|
||||
</array>
|
||||
<key>Version</key>
|
||||
<string>0.0.0.1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Tester/icon.icns
Normal file
BIN
Tester/icon.iconset/icon_128x128.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Tester/icon.iconset/icon_128x128@2x.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
Tester/icon.iconset/icon_16x16.png
Normal file
|
After Width: | Height: | Size: 823 B |
BIN
Tester/icon.iconset/icon_16x16@2x.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Tester/icon.iconset/icon_256x256.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
Tester/icon.iconset/icon_256x256@2x.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
Tester/icon.iconset/icon_32x32.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Tester/icon.iconset/icon_32x32@2x.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
Tester/icon.iconset/icon_512x512.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
Tester/icon.iconset/icon_512x512@2x.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
utils/IconTester.app/Contents/Resources/bin/ffmpeg → Yuba.app.zip
Executable file → Normal file
620
Yuba.php
@@ -3,7 +3,7 @@
|
||||
// Yuba
|
||||
// //
|
||||
//////////////////////////////////////////
|
||||
$version = file_get_contents(__DIR__."/version.txt");
|
||||
$version = file_get_contents(__DIR__."/current_version.txt");
|
||||
|
||||
ini_set('memory_limit', '10240M');
|
||||
date_default_timezone_set("America/Los_Angeles");
|
||||
@@ -11,6 +11,16 @@ date_default_timezone_set("America/Los_Angeles");
|
||||
// Includes & Prefs
|
||||
//////////////////////////////////////////
|
||||
|
||||
// Timestamp
|
||||
|
||||
$mytime = time();
|
||||
$tmpdir = "/tmp/yuba/".$mytime;
|
||||
if (!is_dir($tmpdir)) { mkdir($tmpdir,0777,true); }
|
||||
$stamp = date("Y-m-d_H-i-s", $mytime);
|
||||
if (!file_exists("/tmp/yuba/debug.log")) { touch("/tmp/yuba/debug.log"); }
|
||||
|
||||
// Prefs
|
||||
|
||||
$prefs_file = "/Users/".get_current_user()."/Library/Preferences/org.profiteroles.Yuba.php";
|
||||
if (!file_exists($prefs_file)) {
|
||||
if (!copy(__DIR__."/prefs.php",$prefs_file)) {
|
||||
@@ -25,10 +35,9 @@ require("filetypes.php");
|
||||
|
||||
// Manual prefs
|
||||
|
||||
$wopt_steps = 12; // total number of steps
|
||||
$wopt_steps = 7; // total number of steps
|
||||
$wopt_currstep = 1;
|
||||
$wopt_clear = 0; // set to 0 for debug
|
||||
$wopt_parallel = 1; // use parallel?
|
||||
if ($p['debug']) { $wopt_clear = 0; } else { $wopt_clear = 1; }
|
||||
|
||||
$parser = new plistParser();
|
||||
|
||||
@@ -38,7 +47,14 @@ $parser = new plistParser();
|
||||
// Preferences
|
||||
|
||||
if (@$argv[1] == "Preferences...") {
|
||||
exec($bin_php." ".__DIR__."/YubaPrefs.php 2>&1");
|
||||
exec($bin_php." ".escapeshellarg(__DIR__."/YubaPrefs.php")." 2>&1");
|
||||
die;
|
||||
}
|
||||
|
||||
// Console
|
||||
|
||||
if (@$argv[1] == "Console") {
|
||||
exec("open -n ".__DIR__."/bin/Console.app --args /tmp/yuba/debug.log");
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -46,11 +62,11 @@ if (@$argv[1] == "Preferences...") {
|
||||
|
||||
if (@$argv[1] == "Check for Updates...") {
|
||||
|
||||
$curr_version = file_get_contents("https://www.profiteroles.org/git/profiteroles/Yuba/raw/branch/master/version.txt");
|
||||
$curr_version = file_get_contents("https://www.profiteroles.org/git/p/Yuba/raw/master/current_version.txt");
|
||||
if ($curr_version > $version) {
|
||||
if(askMulti("Yuba ".$curr_version." is available (you have ".$version.")", array("Cancel","Download")) == 1) {
|
||||
exec("open http://git.profiteroles.org/profiteroles/Yuba");
|
||||
die;
|
||||
exec("open https://www.profiteroles.org/git/p/Yuba/");
|
||||
echo "QUITAPP\n";
|
||||
}
|
||||
} else {
|
||||
alert($version." is the latest version","Up-to-date");
|
||||
@@ -59,22 +75,34 @@ if (@$argv[1] == "Check for Updates...") {
|
||||
|
||||
}
|
||||
|
||||
dm("Launching Yuba\n".str_repeat("-",33)."\n".print_r($p,true));
|
||||
|
||||
// PHP Checks
|
||||
//////////////////////////////////////////
|
||||
|
||||
$needed = array("iconv","fileinfo","json","PDO","pdo_sqlite","SimpleXML","sqlite3","xml");
|
||||
foreach ($needed as $ext) {
|
||||
if (!extension_loaded($ext)) {
|
||||
alert("PHP is missing the ".$ext.". Exiting.","PHP Extension Missing");
|
||||
echo "QUITAPP\n";
|
||||
}
|
||||
}
|
||||
if ($p['contents'] && !extension_loaded("zip")) {
|
||||
alert("PHP is missing the zip extension. Yuba will not collect file contents.","PHP Extension Missing");
|
||||
revise_prefs(array("contents" => 0));
|
||||
}
|
||||
|
||||
// Path & application variables
|
||||
//////////////////////////////////////////
|
||||
|
||||
$mytime = time();
|
||||
$tmpdir = "/tmp/yuba/".$mytime;
|
||||
if (!is_dir($tmpdir)) { mkdir($tmpdir,0777,true); }
|
||||
|
||||
$stamp = date("Y-m-d_H-i-s", $mytime);
|
||||
|
||||
if (!isset($argv[1])) { echo "No input"; die; }
|
||||
if (!isset($argv[1]) || $argv[1] == "") { echo "No input"; die; }
|
||||
$zpath = realpath(@$argv[1]);
|
||||
if ($p['bdest']) { $bdest = realpath($p['bdest']); } else { $bdest = "/Users/".get_current_user()."/Documents/Yuba/"; }
|
||||
if (!is_dir($bdest)) { if (!mkdir($bdest)) { echo "Error creating directory: ".$bdest; die; } }
|
||||
if (!is_dir($bdest)) { if (!mkdir($bdest,0777,true)) { echo "Error creating destination directory"; die; } }
|
||||
|
||||
// Check for bundle
|
||||
if ($zpath == "/") { $blabel = "root"; } else { $blabel = preg_replace("/[^A-Za-z0-9\.]/", "_", basename($zpath)); }
|
||||
if (!$p['reuse']) { $blabel .= "-".$mytime; }
|
||||
if (is_writable($zpath)) { echo "Warning: source is writeable\n"; }
|
||||
|
||||
$bpath = chop($bdest,"/")."/".substr(crc32($zpath),0,3)."_".$blabel.".bundle";
|
||||
@@ -91,6 +119,29 @@ ini_set("display_errors", TRUE);
|
||||
ini_set("log_errors", TRUE);
|
||||
ini_set("error_log", $error_log_file);
|
||||
|
||||
// Bundled QlGenerators
|
||||
$generators = @glob(__DIR__."/../Library/Quicklook/*.qlgenerator");
|
||||
if (!empty($generators)) {
|
||||
foreach ($generators as $generator) {
|
||||
$p['bundled_generators'][] = basename($generator);
|
||||
}
|
||||
}
|
||||
|
||||
// Parallel check
|
||||
//////////////////////////////////////////
|
||||
|
||||
$physicalcpu = trim(shell_exec("sysctl -n hw.physicalcpu"));
|
||||
|
||||
if ($p['parallel'] > $physicalcpu) {
|
||||
alert("Parallel hardware mismatch");
|
||||
echo "QUITAPP\n";
|
||||
}
|
||||
if ($p['parallel'] == 1) {
|
||||
$wopt_parallelmsg = "max";
|
||||
} else {
|
||||
$wopt_parallelmsg = $p['parallel'];
|
||||
}
|
||||
|
||||
// Banner
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -99,11 +150,14 @@ if (!is_dir($zpath) | !is_dir($bdest)) { echo "Filepath error"; die; }
|
||||
$banner = "Yuba: ".$zpath." -> ".$bpath;
|
||||
echo msg($banner."\n".str_repeat("-", strlen($banner)));
|
||||
|
||||
// Disk info
|
||||
// System Info
|
||||
//////////////////////////////////////////
|
||||
|
||||
echo msg("Using ".$wopt_parallelmsg." cores");
|
||||
echo msg("Gathering system info...");
|
||||
|
||||
// Disks
|
||||
|
||||
if (substr($zpath, 0, 9) != "/Volumes/") {
|
||||
$zbase = "/";
|
||||
} else {
|
||||
@@ -115,16 +169,14 @@ $host = gethostname();
|
||||
$disks = shell_exec("diskutil list -plist 2>&1");
|
||||
$diskutil = shell_exec("diskutil info -plist ".$zbase." 2>&1");
|
||||
$diskutil_parsed = $parser->parseString(utf8_for_xml($diskutil));
|
||||
//print_r($diskutil_parsed);
|
||||
foreach ($diskutil_parsed['SMARTDeviceSpecificKeysMayVaryNotGuaranteed'] as $key => $value) {
|
||||
$diskutil_parsed[$key] = $value;
|
||||
}
|
||||
unset($diskutil_parsed['SMARTDeviceSpecificKeysMayVaryNotGuaranteed']);
|
||||
$vdisks = shell_exec("hdiutil info -plist 2>&1");
|
||||
$vdisks_parsed = $parser->parseString(utf8_for_xml($vdisks));
|
||||
//print_r($vdisks_parsed);
|
||||
$df = shell_exec("df 2>&1");
|
||||
|
||||
// old method, new method is to parse plist
|
||||
//$df_volume = trim(shell_exec("df ".escapeshellarg($zpath)." | tail -n 1 | rev | cut -d' ' -f1 | rev"));
|
||||
//$df_device = trim(shell_exec("df ".escapeshellarg($zpath)." | tail -n 1 | cut -d' ' -f1"));
|
||||
|
||||
$df_volume = $diskutil_parsed['MountPoint'];
|
||||
$df_device = "/dev/".$diskutil_parsed['ParentWholeDisk'];
|
||||
|
||||
@@ -134,38 +186,10 @@ if (strpos($mdutil,"disabled")) {
|
||||
$p['spotlight'] = false;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// rewrite below to use diskutil info -plist
|
||||
//
|
||||
//
|
||||
//
|
||||
$olddiskutil = shell_exec("diskutil info ".$zbase." 2>&1");
|
||||
$getdetail = array( "Volume Name",
|
||||
"Protocol",
|
||||
"Volume UUID",
|
||||
"Device Location",
|
||||
"Volume Total Space",
|
||||
"Volume Available Space",
|
||||
"Level Type"
|
||||
);
|
||||
foreach ($getdetail as $detail) {
|
||||
preg_match("/(".$detail.":)(.*)(\n)/",$olddiskutil,$matches);
|
||||
if (isset($matches[2])) {
|
||||
if (substr($detail, -5, 5) == "Space") {
|
||||
$pieces = explode(" ", trim($matches[2]));
|
||||
$summary = $pieces[0]." ".$pieces[1];
|
||||
$details[$detail] = $summary;
|
||||
} else {
|
||||
$details[$detail] = trim($matches[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$dstring = serialize($details);
|
||||
if ($zpath == "/") {
|
||||
$type = "Startup disk";
|
||||
} elseif (strtolower($zpath) == strtolower("/Volumes/".$details["Volume Name"])) {
|
||||
if ($details["Protocol"] == "Disk Image") {
|
||||
} elseif (strtolower($zpath) == strtolower("/Volumes/".$diskutil_parsed["VolumeName"])) {
|
||||
if ($diskutil_parsed["BusProtocol"] == "Disk Image") {
|
||||
$type = "Disk image";
|
||||
} else {
|
||||
$type = "External disk";
|
||||
@@ -173,11 +197,6 @@ if ($zpath == "/") {
|
||||
} else {
|
||||
$type = "Folder";
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ($type == "Disk image") {
|
||||
$hdiutil = shell_exec("hdiutil imageinfo -plist ".$df_device." 2>&1");
|
||||
@@ -191,15 +210,30 @@ if ($type == "Disk image") {
|
||||
$image_file = false;
|
||||
}
|
||||
|
||||
// System Profile
|
||||
|
||||
if ($p['profile']) {
|
||||
echo msg("system_profiler");
|
||||
$profile = shell_exec("system_profiler SPHardwareDataType SPStorageDataType SPThunderboltDataType SPUSBDataType 2>&1");
|
||||
} else {
|
||||
$profile = "disabled";
|
||||
}
|
||||
$qlmanage = shell_exec($bin_qlmanage." -m 2>&1");
|
||||
$sysvers = shell_exec("sw_vers 2>&1");
|
||||
|
||||
// QuickLook
|
||||
|
||||
foreach (explode("\n",shell_exec($bin_qlmanage." -m plugins 2>&1")) as $ql_line) {
|
||||
$ql_parts = @explode(" -> ",trim($ql_line));
|
||||
if (@$ql_parts[1]) {
|
||||
$qlmanage['plugins'][$ql_parts[0]] = $ql_parts[1];
|
||||
}
|
||||
}
|
||||
$qlmanage['server'] = trim(shell_exec($bin_qlmanage." -m server 2>&1"));
|
||||
$qlmanage['memory'] = trim(shell_exec($bin_qlmanage." -m memory 2>&1"));
|
||||
$qlmanage['burst'] = trim(shell_exec($bin_qlmanage." -m burst 2>&1"));
|
||||
$qlmanage['threads'] = trim(shell_exec($bin_qlmanage." -m threads 2>&1"));
|
||||
$qlmanage['other'] = trim(shell_exec($bin_qlmanage." -m other 2>&1"));
|
||||
|
||||
// Database
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -211,8 +245,8 @@ $dbo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
|
||||
|
||||
$dbo->query("PRAGMA page_size = 4096");
|
||||
$dbo->query("PRAGMA cache_size = 10000");
|
||||
$dbo->query("PRAGMA locking_mode = EXCLUSIVE");
|
||||
$dbo->query("PRAGMA synchronous = NORMAL");
|
||||
$dbo->query("PRAGMA locking_mode = NORMAL");
|
||||
$dbo->query("PRAGMA journal_mode = WAL");
|
||||
|
||||
$dbo->exec("CREATE TABLE _skim (
|
||||
@@ -230,7 +264,6 @@ $dbo->exec("CREATE TABLE _skim (
|
||||
nodescended INTEGER,
|
||||
ignored INTEGER,
|
||||
dupes INTEGER,
|
||||
details TEXT,
|
||||
qlmanage TEXT,
|
||||
sysvers TEXT,
|
||||
disks TEXT,
|
||||
@@ -289,10 +322,11 @@ $dbo->exec("CREATE TABLE files (
|
||||
thumb_height INTEGER,
|
||||
thumb_tool TEXT,
|
||||
icon_filename TEXT,
|
||||
icon_tool TEXT,
|
||||
contents_filename TEXT
|
||||
)");
|
||||
|
||||
$stmt = $dbo->prepare("INSERT INTO _skim VALUES (:version, :opts, :host, :uid, :zpath, :bpath, :type, :passed_file, :passed_dir, :passed_link, :passed_total, :nodescended, :ignored, :dupes, :details, :qlmanage, :sysvers, :disks, :diskutil, :vdisks, :hdiutil, :image_file, :df, :df_device, :df_volume, :mdutil, :profile, :status)");
|
||||
$stmt = $dbo->prepare("INSERT INTO _skim VALUES (:version, :opts, :host, :uid, :zpath, :bpath, :type, :passed_file, :passed_dir, :passed_link, :passed_total, :nodescended, :ignored, :dupes, :qlmanage, :sysvers, :disks, :diskutil, :vdisks, :hdiutil, :image_file, :df, :df_device, :df_volume, :mdutil, :profile, :status)");
|
||||
$stmt->BindValue(":version",$version);
|
||||
$stmt->BindValue(":opts",serialize($p));
|
||||
$stmt->BindValue(":host",$host);
|
||||
@@ -300,8 +334,7 @@ $stmt->BindValue(":uid",posix_getuid());
|
||||
$stmt->BindValue(":zpath",$zpath);
|
||||
$stmt->BindValue(":bpath",$bpath);
|
||||
$stmt->BindValue(":type",$type);
|
||||
$stmt->BindValue(":details",$dstring);
|
||||
$stmt->BindValue(":qlmanage",$qlmanage);
|
||||
$stmt->BindValue(":qlmanage",serialize($qlmanage));
|
||||
$stmt->BindValue(":sysvers",$sysvers);
|
||||
$stmt->BindValue(":disks",$disks);
|
||||
$stmt->BindValue(":diskutil",$diskutil);
|
||||
@@ -381,26 +414,6 @@ if (!$passed_total) {
|
||||
|
||||
echo msg("Total files: ".$passed_total."");
|
||||
|
||||
// Pool DB
|
||||
//////////////////////////////////////////
|
||||
|
||||
$dbp = new PDO("sqlite:".$bpath."/pool.sqlite3");
|
||||
|
||||
$dbp->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
//$dbp->query("PRAGMA page_size = 4096");
|
||||
//$dbp->query("PRAGMA cache_size = 10000");
|
||||
//$dbp->query("PRAGMA locking_mode = EXCLUSIVE");
|
||||
//$dbp->query("PRAGMA synchronous = NORMAL");
|
||||
//$dbp->query("PRAGMA journal_mode = WAL");
|
||||
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS md5 (fid TEXT, hash TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS exiftool (fid TEXT, tags TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS mediainfo (fid TEXT, info TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS thumbs (fid TEXT, created INTEGER, relative_path TEXT, width INTEGER, height INTEGER, tool TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS icons (fid TEXT, hash TEXT, created INTEGER, relative_path TEXT, tool TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS contents (fid TEXT, created INTEGER, relative_path TEXT)");
|
||||
|
||||
// Prescan
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -408,8 +421,8 @@ $i = 0;
|
||||
$family = array();
|
||||
$fids = array();
|
||||
$noread = array();
|
||||
$fx = new SplFixedArray($passed_file);
|
||||
$splcount = 0;
|
||||
$bline = array();
|
||||
|
||||
echo ProgressBar::start($passed_total,"Prescan (".stepString().")");
|
||||
|
||||
@@ -420,14 +433,15 @@ foreach ($files as $splFileInfo) {
|
||||
$shellpath = escapeshellarg($splFileInfo->getPathname());
|
||||
$realpath = $splFileInfo->getRealPath();
|
||||
|
||||
$key = md5($pathname);
|
||||
$pid = md5($pathname);
|
||||
$pkey = md5($path);
|
||||
$fid = null;
|
||||
|
||||
if (array_key_exists($key, $family)) {
|
||||
if (array_key_exists($pid, $family)) {
|
||||
echo msg("Duplicate key on ".$pathname.""); die;
|
||||
}
|
||||
|
||||
$family[$key] = array();
|
||||
$family[$pid] = array();
|
||||
|
||||
// Path-agnostic Unique File ID (to prevent redundant hashes and thumbs)
|
||||
|
||||
@@ -435,8 +449,7 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
$fid = md5($splFileInfo->getSize().$splFileInfo->getMtime().$splFileInfo->getBasename());
|
||||
$dx[$fid][] = $pathname;
|
||||
$fx[$splcount] = array($fid, $pathname);
|
||||
$family[$key]['fid'] = $fid;
|
||||
$family[$pid]['fid'] = $fid;
|
||||
$splcount++;
|
||||
|
||||
}
|
||||
@@ -460,6 +473,27 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
}
|
||||
|
||||
// Create batch
|
||||
|
||||
if ($p['thumbs'] || $p['icons'] || $p['meta'] || $p['hash'] || $p['contents'] || $p['spotlight']) {
|
||||
|
||||
$parts = array();
|
||||
$parts[] = $bin_php;
|
||||
$parts[] = escapeshellarg(realpath("helper.php"));
|
||||
$parts[] = $i;
|
||||
$parts[] = $passed_total;
|
||||
$parts[] = $fid ?: $pid;
|
||||
$parts[] = escapeshellarg($pathname);
|
||||
$parts[] = $splFileInfo->getType();
|
||||
$parts[] = escapeshellarg($bpath);
|
||||
$parts[] = $mytime;
|
||||
$parts[] = $p['spotlight'];
|
||||
|
||||
$tcmd = implode(" ",$parts);
|
||||
$bline[] = $tcmd;
|
||||
|
||||
}
|
||||
|
||||
// Check file can be read
|
||||
|
||||
if ($realpath && !is_readable($realpath)) {
|
||||
@@ -468,7 +502,6 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
// Children
|
||||
|
||||
//$family[$pkey]['children'][] = $key;
|
||||
$family[$pkey]['children'][] = $i+1;
|
||||
|
||||
echo ProgressBar::next(true);
|
||||
@@ -476,6 +509,12 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
}
|
||||
|
||||
$batchfile = $tmpdir."/batch.sh";
|
||||
if (!empty($bline)) {
|
||||
file_put_contents($batchfile,implode("\n", $bline));
|
||||
msg("Writing batch to file");
|
||||
}
|
||||
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
// Thow permissions error
|
||||
@@ -552,228 +591,48 @@ $dbo->exec($stmt);
|
||||
|
||||
$wopt_currstep++;
|
||||
|
||||
// Directory Previews
|
||||
// Init Spotlight DB
|
||||
//////////////////////////////////////////
|
||||
|
||||
echo ProgressBar::start(count($fx),"Searching for directory previews (".stepString().")");
|
||||
foreach ($fx as $array) {
|
||||
$fid = $array[0];
|
||||
$pathname = $array[1];
|
||||
if (in_array(basename($pathname),$p['p_files'])) {
|
||||
$dpreview[dirname($pathname)] = $fid;
|
||||
}
|
||||
echo ProgressBar::next();
|
||||
}
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
if ($p['spotlight']) { $dbo->exec("CREATE TABLE mdls (id INTEGER PRIMARY KEY,".implode(",",$cbuild).")"); }
|
||||
|
||||
// Thumbs
|
||||
// Pool DB
|
||||
//////////////////////////////////////////
|
||||
|
||||
if ($p['thumbs']) {
|
||||
$dbp = new PDO("sqlite:".$bpath."/pool.sqlite3");
|
||||
|
||||
echo ProgressBar::start($passed_file,"Creating thumb batch (".stepString().")",1);
|
||||
$dbp->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$batchfile = $tmpdir."/_batch_thumbs.sh";
|
||||
$helper = realpath("helper.php");
|
||||
|
||||
foreach ($fx as $count => $array) {
|
||||
$fid = $array[0];
|
||||
$pathname = $array[1];
|
||||
$tcmd = $bin_php." ".$helper." thumbs ".$fid." ".escapeshellarg($pathname)." ".escapeshellarg($bpath)." ".$mytime."; echo ".ProgressBar::next();
|
||||
msg($tcmd);
|
||||
$line[] = $tcmd;
|
||||
}
|
||||
|
||||
file_put_contents($batchfile,implode("\n", $line));
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
echo ProgressBar::start($passed_file,"Running thumb batch (".stepString().")");
|
||||
if ($wopt_parallel) {
|
||||
$dbp->query("PRAGMA page_size = 4096");
|
||||
$dbp->query("PRAGMA cache_size = 10000");
|
||||
$dbp->query("PRAGMA synchronous = NORMAL");
|
||||
$dbp->query("PRAGMA locking_mode = NORMAL");
|
||||
$dbp->query("PRAGMA journal_mode = WAL");
|
||||
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS md5 (fid TEXT, hash TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS exiftool (fid TEXT, tags TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS mediainfo (fid TEXT, info TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS thumbs (fid TEXT, created INTEGER, relative_path TEXT, width INTEGER, height INTEGER, tool TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS icons (fid TEXT, hash TEXT, created INTEGER, relative_path TEXT, tool TEXT)");
|
||||
$dbp->exec("CREATE TABLE IF NOT EXISTS contents (fid TEXT, created INTEGER, relative_path TEXT)");
|
||||
|
||||
// Helper
|
||||
//////////////////////////////////////////
|
||||
|
||||
if (file_exists($batchfile)) {
|
||||
|
||||
echo ProgressBar::start($passed_file,"Running batch (".stepString().")");
|
||||
if ($p['parallel'] === 0) {
|
||||
passthru("bash ".$batchfile);
|
||||
} elseif ($p['parallel'] === 1) {
|
||||
passthru($bin_parallel." < ".$batchfile);
|
||||
} else {
|
||||
passthru("bash ".$batchfile);
|
||||
passthru($bin_parallel." -j ".$p['parallel']." < ".$batchfile);
|
||||
}
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
}
|
||||
|
||||
// Icons
|
||||
//////////////////////////////////////////
|
||||
|
||||
if ($p['icons']) {
|
||||
|
||||
echo ProgressBar::start($passed_file,"Creating icon batch (".stepString().")",1);
|
||||
|
||||
$batchfile = $tmpdir."/_batch_icons.sh";
|
||||
$helper = realpath("helper.php");
|
||||
|
||||
foreach ($fx as $count => $array) {
|
||||
$fid = $array[0];
|
||||
$pathname = $array[1];
|
||||
$icmd = $bin_php." ".$helper." icons ".$fid." ".escapeshellarg($pathname)." ".escapeshellarg($bpath)." ".$mytime."; echo ".ProgressBar::next();
|
||||
msg($icmd);
|
||||
$line[] = $icmd;
|
||||
}
|
||||
|
||||
file_put_contents($batchfile,implode("\n", $line));
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
echo ProgressBar::start($passed_file,"Running icon batch (".stepString().")");
|
||||
if ($wopt_parallel) {
|
||||
passthru($bin_parallel." < ".$batchfile);
|
||||
} else {
|
||||
passthru("bash ".$batchfile);
|
||||
}
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
}
|
||||
|
||||
// External metadata
|
||||
//////////////////////////////////////////
|
||||
|
||||
if ($p['meta']) {
|
||||
|
||||
echo ProgressBar::start(count($fx),"Collecting external metadata (".stepString().")");
|
||||
|
||||
foreach ($fx as $array) {
|
||||
|
||||
$fid = $array[0];
|
||||
$pathname = $array[1];
|
||||
$shellpath = escapeshellarg($pathname);
|
||||
$ext = pathinfo($pathname,PATHINFO_EXTENSION);
|
||||
$found = 1;
|
||||
|
||||
if (!in_array($ext, $p['e_files']) && !in_array($ext, $p['m_files'])) {
|
||||
echo ProgressBar::next("Not a media file: ".shortlabel($pathname));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($ext, $p['e_files'])) {
|
||||
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM exiftool WHERE fid='".$fid."')")->fetch()[0];
|
||||
if (!$check) {
|
||||
$arrstring = shell_exec($bin_exiftool." -php ".$shellpath);
|
||||
// $rawexif = eval("return ".`$bin_exiftool -php $shellpath`);
|
||||
// do an addtl check below to prevent "PHP Parse error: syntax error, unexpected end of file, expecting ';'"
|
||||
if (substr($arrstring,0,5) == "Array") {
|
||||
$rawexif = eval("return ".$arrstring);
|
||||
$stmt = $dbp->prepare("INSERT INTO exiftool VALUES (:fid, :tags)");
|
||||
$stmt->BindValue(":fid",$fid);
|
||||
$stmt->BindValue(":tags",serialize($rawexif[0]));
|
||||
$stmt->execute();
|
||||
$found = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array($ext, $p['m_files'])) {
|
||||
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM mediainfo WHERE fid='".$fid."')")->fetch()[0];
|
||||
if (!$check) {
|
||||
$stmt = $dbp->prepare("INSERT INTO mediainfo VALUES (:fid, :info)");
|
||||
$stmt->BindValue(":fid",$fid);
|
||||
//$stmt->BindValue(":info",serialize(parseMediaInfo(shell_exec($bin_mediainfo." --Output=OLDXML ".$shellpath." 2>&1"))));
|
||||
//$stmt->BindValue(":info",shell_exec($bin_mediainfo." --Output=OLDXML ".$shellpath." 2>&1"));
|
||||
$stmt->BindValue(":info",shell_exec($bin_mediainfo." --Output=JSON ".$shellpath." 2>&1"));
|
||||
$stmt->execute();
|
||||
$found = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found) {
|
||||
echo ProgressBar::next("Metadata found: ".shortlabel($pathname));
|
||||
} else {
|
||||
echo ProgressBar::next("Collecting metadata: ".shortlabel($pathname));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
}
|
||||
|
||||
// Hashes
|
||||
//////////////////////////////////////////
|
||||
|
||||
if ($p['hash']) {
|
||||
|
||||
if ($p['hash_limit']) {
|
||||
$message = "Generating hashes for files under ".$p['hash_limit']."GB";
|
||||
} else {
|
||||
$message = "Generating hashes for all files";
|
||||
}
|
||||
|
||||
echo ProgressBar::start(count($fx),$message." (".stepString().")");
|
||||
|
||||
foreach ($fx as $array) {
|
||||
$fid = $array[0];
|
||||
$pathname = $array[1];
|
||||
$size = filesize($pathname);
|
||||
$limit = $p['hash_limit']*1000000000;
|
||||
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM md5 WHERE fid='".$fid."')")->fetch()[0];
|
||||
if ($check) {
|
||||
echo ProgressBar::next("Hash already exists: ".shortlabel($pathname));
|
||||
} elseif ($p['hash_limit'] && ($size > $limit)) {
|
||||
echo ProgressBar::next("Too big to hash: ".shortlabel($pathname)." (".human_filesize($size).")");
|
||||
} else {
|
||||
echo ProgressBar::next("Generating hash: ".shortlabel($pathname));
|
||||
$stmt = $dbp->prepare("INSERT INTO md5 VALUES (:fid, :hash)");
|
||||
$stmt->BindValue(":fid",$fid);
|
||||
$stmt->BindValue(":hash",md5_file($pathname));
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
||||
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
}
|
||||
|
||||
// Contents
|
||||
//////////////////////////////////////////
|
||||
|
||||
if ($p['contents']) {
|
||||
|
||||
// should be rewritten to check against filemtimes
|
||||
|
||||
echo ProgressBar::start(count($fx),"Gathering contents (".stepString().")");
|
||||
|
||||
foreach ($fx as $array) {
|
||||
$fid = $array[0];
|
||||
$pathname = $array[1];
|
||||
$ext = pathinfo($pathname,PATHINFO_EXTENSION);
|
||||
$cpath = $bpath."/contents/".substr($fid, 0, 2);
|
||||
$cfile = $cpath."/".$fid.".zip";
|
||||
if (in_array($ext, $p['c_files'])) {
|
||||
if (!is_dir($cpath)) { mkdir($cpath); }
|
||||
$max_size = $p['contents_limit'] * 1000;
|
||||
if ($ext == ".DS_Store") {
|
||||
// store all DS_Store files no matter how big
|
||||
$my_size = 1;
|
||||
} else {
|
||||
$my_size = filesize($pathname);
|
||||
}
|
||||
if (!file_exists($cfile) && $my_size < $max_size) {
|
||||
|
||||
msg("Zipping ".$pathname);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$zip->open($cfile, ZipArchive::CREATE);
|
||||
$zip->addfile($pathname,basename($pathname));
|
||||
$zip->close();
|
||||
|
||||
$stmt = $dbp->prepare("INSERT INTO contents VALUES (:fid, :created, :relative_path)");
|
||||
$stmt->BindValue(":fid",$fid);
|
||||
$stmt->BindValue(":created",time());
|
||||
$stmt->BindValue(":relative_path",substr($cfile, strlen($bpath)));
|
||||
$stmt->execute();
|
||||
|
||||
}
|
||||
}
|
||||
echo ProgressBar::next(true);
|
||||
}
|
||||
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
}
|
||||
|
||||
// Pool Indices
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -786,102 +645,6 @@ $dbp->exec("CREATE INDEX IF NOT EXISTS mediainfo_index ON mediainfo (fid)");
|
||||
$dbp->exec("CREATE INDEX IF NOT EXISTS thumbs_index ON thumbs (fid)");
|
||||
$dbp->exec("CREATE INDEX IF NOT EXISTS icons_index ON icons (fid)");
|
||||
|
||||
// Spotlight
|
||||
//////////////////////////////////////////
|
||||
|
||||
$mb['i'] = array( "PixelWidth",
|
||||
"PixelHeight",
|
||||
"Latitude",
|
||||
"Longitude",
|
||||
"DurationSeconds",
|
||||
"UseCount",
|
||||
"FSInvisible",
|
||||
"NumberOfPages",
|
||||
"PageHeight",
|
||||
"PageWidth",
|
||||
"TotalBitRate" );
|
||||
|
||||
$mb['t'] = array( "Title",
|
||||
"ContentType",
|
||||
"Creator",
|
||||
"FSCreatorCode",
|
||||
"Kind",
|
||||
"FSTypeCode" );
|
||||
|
||||
$mb['a'] = array( "UserTags",
|
||||
"WhereFroms",
|
||||
"EncodingApplications" );
|
||||
|
||||
$mb['d'] = array( "DateAdded",
|
||||
"LastUsedDate",
|
||||
"ContentModificationDate",
|
||||
"ContentCreationDate" );
|
||||
|
||||
$ibuild[] = ":pid, :spotlight";
|
||||
$cbuild[] = "pid TEXT, spotlight TEXT";
|
||||
foreach (array_merge($mb['i'],$mb['d']) as $item) {
|
||||
$cbuild[] = $item." INTEGER";
|
||||
$ibuild[] = ":".$item;
|
||||
}
|
||||
foreach (array_merge($mb['t'],$mb['a']) as $item) {
|
||||
$cbuild[] = $item." TEXT";
|
||||
$ibuild[] = ":".$item;
|
||||
}
|
||||
|
||||
if ($p['spotlight']) {
|
||||
|
||||
echo ProgressBar::start($passed_total,"Spotlight (".stepString().")");
|
||||
|
||||
$dbo->exec("CREATE TABLE mdls (".implode(",",$cbuild).")");
|
||||
|
||||
foreach ($files as $splFileInfo) {
|
||||
|
||||
$path = $splFileInfo->getPathname();
|
||||
msg($path);
|
||||
|
||||
$pid = md5($path);
|
||||
$shellpath = escapeshellarg($path);
|
||||
$mdls = shell_exec("mdls -plist - ".$shellpath." 2>&1");
|
||||
|
||||
if (substr_count(@$mdls,"\n") > 1) {
|
||||
$spotlight = $parser->parseString(utf8_for_xml($mdls));
|
||||
} else {
|
||||
$spotlight = array();
|
||||
}
|
||||
|
||||
$stmt = $dbo->prepare("INSERT INTO mdls VALUES (".implode(",",$ibuild).")");
|
||||
|
||||
foreach ($mb as $key => $list) {
|
||||
foreach ($list as $item) {
|
||||
|
||||
if (@$spotlight["kMDItem".$item]) {
|
||||
$stmt->BindValue(":pid",$pid);
|
||||
$stmt->BindValue(":spotlight",$mdls);
|
||||
switch($key) {
|
||||
case "i":
|
||||
case "t":
|
||||
$stmt->BindValue(":".$item,$spotlight["kMDItem".$item]);
|
||||
break;
|
||||
case "a":
|
||||
$stmt->BindValue(":".$item,serialize($spotlight["kMDItem".$item]));
|
||||
break;
|
||||
case "d":
|
||||
$stmt->BindValue(":".$item,strtotime($spotlight["kMDItem".$item]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$stmt->execute();
|
||||
echo ProgressBar::next(true);
|
||||
|
||||
}
|
||||
|
||||
echo ProgressBar::finish($wopt_clear);
|
||||
|
||||
}
|
||||
|
||||
// Files
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -893,7 +656,7 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
// DB
|
||||
|
||||
$stmt = $dbo->prepare("INSERT INTO files VALUES (:pid, :fid, :Pathname, :Path, :Filename, :Extension, :Type, :Size, :Inode, :Perms, :Owner, :ATime, :MTime, :CTime, :LinkTarget, :RealPath, :stat, :items, :newest, :fkind, :gfi_type, :gfi_attr, :gfi_created, :has_exif, :has_mediainfo, :has_hash, :thumb_filename, :thumb_width, :thumb_height, :thumb_tool, :icon_filename, :contents_filename)");
|
||||
$stmt = $dbo->prepare("INSERT INTO files VALUES (:pid, :fid, :Pathname, :Path, :Filename, :Extension, :Type, :Size, :Inode, :Perms, :Owner, :ATime, :MTime, :CTime, :LinkTarget, :RealPath, :stat, :items, :newest, :fkind, :gfi_type, :gfi_attr, :gfi_created, :has_exif, :has_mediainfo, :has_hash, :thumb_filename, :thumb_width, :thumb_height, :thumb_tool, :icon_filename, :icon_tool, :contents_filename)");
|
||||
|
||||
// Identify dir, file, link or bundle dir
|
||||
|
||||
@@ -1020,7 +783,13 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
if ($type == "file") {
|
||||
|
||||
unset($fetch_exif, $fetch_media, $fetch_hash, $fetch_thumb, $yes_exif, $yes_media, $yes_hash);
|
||||
$fetch_icon = @$dbp->query("SELECT * FROM icons WHERE fid='".$fid."'")->fetch();
|
||||
if (@$fetch_icon['relative_path']) {
|
||||
$stmt->BindValue(":icon_filename",$fetch_icon['relative_path']);
|
||||
$stmt->BindValue(":icon_tool",$fetch_icon['tool']);
|
||||
}
|
||||
|
||||
unset($fetch_exif, $fetch_media, $fetch_hash, $fetch_thumb, $fetch_icon, $yes_exif, $yes_media, $yes_hash);
|
||||
|
||||
$yes_exif = $dbp->query("SELECT rowid FROM exiftool WHERE fid='".$fid."'")->fetch()[0];
|
||||
$stmt->BindValue(":has_exif",$yes_exif);
|
||||
@@ -1034,9 +803,8 @@ foreach ($files as $splFileInfo) {
|
||||
$yes_contents = $dbp->query("SELECT relative_path FROM contents WHERE fid='".$fid."'")->fetch()[0];
|
||||
$stmt->BindValue(":contents_filename",$yes_contents);
|
||||
|
||||
if (!in_array($extension, $p['t_skip'])) {
|
||||
$fetch_thumb = $dbp->query("SELECT * FROM thumbs WHERE fid='".$fid."'")->fetch();
|
||||
}
|
||||
$fetch_thumb = $dbp->query("SELECT * FROM thumbs WHERE fid='".$fid."'")->fetch();
|
||||
|
||||
if (@$fetch_thumb['relative_path']) {
|
||||
$stmt->BindValue(":thumb_filename",$fetch_thumb['relative_path']);
|
||||
$stmt->BindValue(":thumb_width",$fetch_thumb['width']);
|
||||
@@ -1045,30 +813,29 @@ foreach ($files as $splFileInfo) {
|
||||
} else {
|
||||
$stmt->BindValue(":thumb_filename",null);
|
||||
}
|
||||
|
||||
$fetch_icon = $dbp->query("SELECT * FROM icons WHERE fid='".$fid."'")->fetch();
|
||||
|
||||
} else {
|
||||
|
||||
unset($fetch_icon, $fetch_thumb);
|
||||
|
||||
$fetch_icon = @$dbp->query("SELECT * FROM icons WHERE fid='".$pid."'")->fetch();
|
||||
if (@$fetch_icon['relative_path']) {
|
||||
$stmt->BindValue(":icon_filename",$fetch_icon['relative_path']);
|
||||
} else {
|
||||
$stmt->BindValue(":icon_filename",null);
|
||||
$stmt->BindValue(":icon_tool",$fetch_icon['tool']);
|
||||
}
|
||||
|
||||
$fetch_thumb = $dbp->query("SELECT * FROM thumbs WHERE fid='".$pid."'")->fetch();
|
||||
|
||||
} elseif ($type == "dir") {
|
||||
|
||||
if (@is_array($dpreview) && $dpreview[$pathname]) {
|
||||
$fetch_thumb = $dbp->query("SELECT * FROM thumbs WHERE fid='".$dpreview[$pathname]."'")->fetch();
|
||||
if (@$fetch_thumb['relative_path']) {
|
||||
$stmt->BindValue(":thumb_filename",$fetch_thumb['relative_path']);
|
||||
$stmt->BindValue(":thumb_width",$fetch_thumb['width']);
|
||||
$stmt->BindValue(":thumb_height",$fetch_thumb['height']);
|
||||
$stmt->BindValue(":thumb_tool",$fetch_thumb['tool']);
|
||||
} else {
|
||||
$stmt->BindValue(":thumb_filename",null);
|
||||
}
|
||||
if (@$fetch_thumb['relative_path']) {
|
||||
$stmt->BindValue(":thumb_filename",$fetch_thumb['relative_path']);
|
||||
$stmt->BindValue(":thumb_width",$fetch_thumb['width']);
|
||||
$stmt->BindValue(":thumb_height",$fetch_thumb['height']);
|
||||
$stmt->BindValue(":thumb_tool",$fetch_thumb['tool']);
|
||||
} else {
|
||||
$stmt->BindValue(":thumb_filename",null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------ //
|
||||
|
||||
@@ -1204,9 +971,11 @@ while ($row_a = $loop->fetch()) {
|
||||
}
|
||||
|
||||
$m['m']['SkimTrackCount'] = @count($m_base);
|
||||
foreach (@$m_base as $track) {
|
||||
if (!@$m['m']['SkimDims'] && @$track['Width'] && @$track['Height']) {
|
||||
$m['m']['SkimDims'] = @sanitize($track['Width'],"i").$display_delimiter.@sanitize($track['Height'],"i");
|
||||
if (is_array($m_base)) {
|
||||
foreach (@$m_base as $track) {
|
||||
if (!@$m['m']['SkimDims'] && @$track['Width'] && @$track['Height']) {
|
||||
$m['m']['SkimDims'] = @sanitize($track['Width'],"i").$display_delimiter.@sanitize($track['Height'],"i");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1245,7 +1014,7 @@ while ($row_a = $loop->fetch()) {
|
||||
} elseif (!$found) {
|
||||
|
||||
// find a single value
|
||||
list($kind,$item) = explode("^",$dindex);
|
||||
list($kind,$item) = @explode("^",$dindex);
|
||||
if (@$m[$kind][$item]) {
|
||||
$stmt->BindValue(":".$name,@sanitize($m[$kind][$item],$type));
|
||||
$found = 1;
|
||||
@@ -1276,7 +1045,10 @@ $dbo->exec("UPDATE _skim SET status='completed_in_".$seconds."'");
|
||||
|
||||
// rsync
|
||||
|
||||
if ($p['postflight'] == 2 && $p['rsync_dest']) {
|
||||
if ($p['postflight'] == 3) {
|
||||
$url = "http://localhost/rtc.php?db=data/".basename($bpath)."/".$stamp.".sqlite3";
|
||||
exec("open ".$url);
|
||||
} elseif ($p['postflight'] == 2 && $p['rsync_dest']) {
|
||||
echo msg("rsync...");
|
||||
$command = "rsync -avv -e ssh ".$bpath." ".$p['rsync_dest'];
|
||||
$count = trim(shell_exec("find ".escapeshellarg($bpath)." | wc -l"));
|
||||
@@ -1293,6 +1065,6 @@ $done = "Finished ".$zpath." in ".$seconds." seconds";
|
||||
$done_m = "Memory usage: ".prettysize(memory_get_usage(true));
|
||||
echo msg($done."\n".$done_m); notification($done);
|
||||
|
||||
unset($dbo, $dbp, $files, $family, $fx);
|
||||
unset($dbo, $dbp, $files, $family);
|
||||
|
||||
?>
|
||||
72
Yuba.platypus
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AcceptsFiles</key>
|
||||
<true/>
|
||||
<key>AcceptsText</key>
|
||||
<false/>
|
||||
<key>Authentication</key>
|
||||
<false/>
|
||||
<key>Author</key>
|
||||
<string>profiteroles</string>
|
||||
<key>BundledFiles</key>
|
||||
<array>
|
||||
<string>/Volumes/Code/Yuba/master/current_version.txt</string>
|
||||
<string>/Volumes/Code/Yuba/master/filetypes.php</string>
|
||||
<string>/Volumes/Code/Yuba/master/functions.php</string>
|
||||
<string>/Volumes/Code/Yuba/master/hr.png</string>
|
||||
<string>/Volumes/Code/Yuba/master/prefs.php</string>
|
||||
<string>/Volumes/Code/Yuba/master/helper.php</string>
|
||||
<string>/Volumes/Code/Yuba/master/Yuba.php</string>
|
||||
<string>/Volumes/Code/Yuba/master/YubaPrefs.php</string>
|
||||
<string>/Volumes/Code/Yuba/bin</string>
|
||||
</array>
|
||||
<key>Creator</key>
|
||||
<string>Platypus-5.3</string>
|
||||
<key>DeclareService</key>
|
||||
<false/>
|
||||
<key>DevelopmentVersion</key>
|
||||
<false/>
|
||||
<key>Droppable</key>
|
||||
<true/>
|
||||
<key>IconPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/icon.icns</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.profiteroles.Yuba</string>
|
||||
<key>InterfaceType</key>
|
||||
<string>Progress Bar</string>
|
||||
<key>InterpreterPath</key>
|
||||
<string>/bin/bash</string>
|
||||
<key>Name</key>
|
||||
<string>Yuba</string>
|
||||
<key>NibPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/MainMenu.nib</string>
|
||||
<key>OptimizeApplication</key>
|
||||
<true/>
|
||||
<key>Overwrite</key>
|
||||
<false/>
|
||||
<key>PromptForFileOnLaunch</key>
|
||||
<false/>
|
||||
<key>RemainRunning</key>
|
||||
<true/>
|
||||
<key>RunInBackground</key>
|
||||
<false/>
|
||||
<key>ScriptPath</key>
|
||||
<string>/Volumes/Code/Yuba/master/script</string>
|
||||
<key>TextBackground</key>
|
||||
<string>#ffffff</string>
|
||||
<key>TextFont</key>
|
||||
<string>SFMono-Regular</string>
|
||||
<key>TextForeground</key>
|
||||
<string>#000000</string>
|
||||
<key>TextSize</key>
|
||||
<real>11</real>
|
||||
<key>UniformTypes</key>
|
||||
<array>
|
||||
<string>public.folder</string>
|
||||
</array>
|
||||
<key>Version</key>
|
||||
<string>0.0.0.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
// Functions
|
||||
|
||||
function makeWindowString($p, $strings) {
|
||||
function makeWindowString($p, $strings, $pstrings) {
|
||||
|
||||
$conf = "
|
||||
# Set window title
|
||||
@@ -19,11 +19,16 @@ function makeWindowString($p, $strings) {
|
||||
bdest.default = ".$p['bdest']."
|
||||
bdest.width = 380
|
||||
|
||||
reuse.type = checkbox
|
||||
reuse.label = Add to existing catalogs
|
||||
reuse.default = ".$p['reuse']."
|
||||
|
||||
postflight.type = popup
|
||||
postflight.label = When finished
|
||||
postflight.option = ".$strings[0][0]."
|
||||
postflight.option = ".$strings[0][1]."
|
||||
postflight.option = ".$strings[0][2]."
|
||||
postflight.option = ".$strings[0][3]."
|
||||
postflight.default = ".$strings[0][$p['postflight']]."
|
||||
postflight.width = 380
|
||||
|
||||
@@ -33,6 +38,28 @@ function makeWindowString($p, $strings) {
|
||||
rsync_dest.placeholder = user@server.com:files/
|
||||
rsync_dest.width = 380
|
||||
|
||||
hr0.type = image
|
||||
hr0.path = ".__DIR__."/hr.png"."
|
||||
hr0.width = 380
|
||||
hr0.height = 2
|
||||
|
||||
parallel.type = popup
|
||||
parallel.width = 180
|
||||
parallel.default = ".$pstrings[$p['parallel']]."
|
||||
";
|
||||
|
||||
foreach ($pstrings as $pstring) {
|
||||
$conf .= "parallel.option = ".$pstring."\n";
|
||||
}
|
||||
|
||||
$conf .= "
|
||||
|
||||
debug.type = checkbox
|
||||
debug.label = Verbose logging
|
||||
debug.default = ".$p['debug']."
|
||||
debug.x = 200
|
||||
debug.y = 443
|
||||
|
||||
hr1.type = image
|
||||
hr1.path = ".__DIR__."/hr.png"."
|
||||
hr1.width = 380
|
||||
@@ -71,15 +98,14 @@ function makeWindowString($p, $strings) {
|
||||
thumbs.default = ".$strings[2][$p['thumbs']]."
|
||||
thumbs.width = 120
|
||||
|
||||
thumb_priority.type = popup
|
||||
thumb_priority.label = Priority
|
||||
thumb_priority.option = ".$strings[3][0]."
|
||||
thumb_priority.option = ".$strings[3][1]."
|
||||
thumb_priority.option = ".$strings[3][2]."
|
||||
thumb_priority.default = ".$strings[3][$p['thumb_priority']]."
|
||||
thumb_priority.width = 120
|
||||
thumb_priority.x = 150
|
||||
thumb_priority.y = 227
|
||||
thumb_mode.type = popup
|
||||
thumb_mode.label = Mode
|
||||
thumb_mode.option = ".$strings[3][0]."
|
||||
thumb_mode.option = ".$strings[3][1]."
|
||||
thumb_mode.default = ".$strings[3][$p['thumb_mode']]."
|
||||
thumb_mode.width = 120
|
||||
thumb_mode.x = 150
|
||||
thumb_mode.y = 227
|
||||
|
||||
thumb_size.type = textfield
|
||||
thumb_size.default = ".$p['thumb_size']."
|
||||
@@ -97,14 +123,15 @@ function makeWindowString($p, $strings) {
|
||||
icons.default = ".$strings[2][$p['icons']]."
|
||||
icons.width = 120
|
||||
|
||||
icon_tool.type = popup
|
||||
icon_tool.label = Tool
|
||||
icon_tool.option = ".$strings[4][0]."
|
||||
icon_tool.option = ".$strings[4][1]."
|
||||
icon_tool.default = ".$strings[4][$p['icon_tool']]."
|
||||
icon_tool.width = 120
|
||||
icon_tool.x = 150
|
||||
icon_tool.y = 162
|
||||
icon_mode.type = popup
|
||||
icon_mode.label = Mode
|
||||
icon_mode.option = ".$strings[4][0]."
|
||||
icon_mode.option = ".$strings[4][1]."
|
||||
icon_mode.option = ".$strings[4][2]."
|
||||
icon_mode.default = ".$strings[4][$p['icon_mode']]."
|
||||
icon_mode.width = 120
|
||||
icon_mode.x = 150
|
||||
icon_mode.y = 162
|
||||
|
||||
icon_size.type = textfield
|
||||
icon_size.default = ".$p['icon_size']."
|
||||
@@ -190,16 +217,25 @@ if(!$p['bdest']) {
|
||||
|
||||
// Load strings
|
||||
|
||||
$strings[] = array("Do nothing","Reveal result in Finder","Upload result with rsync");
|
||||
$strings[] = array("Do nothing","Reveal result in Finder","Upload result with rsync","Open via localhost URL");
|
||||
$strings[] = array("Skip","Collect","Collect & verify","Collect & repair atimes");
|
||||
$strings[] = array("Skip","Generate","Rebuild");
|
||||
$strings[] = array("external","ql-thumbnail","qlmanage");
|
||||
$strings[] = array("qltool","qlmanage");
|
||||
$strings[] = array("Most files","Some files");
|
||||
$strings[] = array("All files","Most files","Some files");
|
||||
|
||||
// Parallel strings
|
||||
|
||||
$physicalcpu = trim(shell_exec("sysctl -n hw.physicalcpu"));
|
||||
|
||||
$pstrings = array("Sequential","Max (Not advised)");
|
||||
foreach(range(2, $physicalcpu-1) as $index) {
|
||||
$pstrings[] = $index." Cores";
|
||||
}
|
||||
|
||||
// Launch Pashua and parse results
|
||||
|
||||
$path = __DIR__."/Pashua.app/Contents/MacOS/Pashua";
|
||||
$raw = shell_exec("echo ".escapeshellarg(makeWindowString($p, $strings))." | ".escapeshellarg($path)." - ");
|
||||
$path = __DIR__."/bin/Pashua.app/Contents/MacOS/Pashua";
|
||||
$raw = shell_exec("echo ".escapeshellarg(makeWindowString($p, $strings, $pstrings))." | ".escapeshellarg($path)." - ");
|
||||
$result = array();
|
||||
foreach (explode("\n", $raw) as $line) {
|
||||
preg_match('/^(\w+)=(.*)$/', $line, $matches);
|
||||
@@ -221,9 +257,10 @@ if (@$result['cb']) {
|
||||
$result['postflight'] = array_search($result['postflight'],$strings[0]);
|
||||
$result['stat_mode'] = array_search($result['stat_mode'],$strings[1]);
|
||||
$result['thumbs'] = array_search($result['thumbs'],$strings[2]);
|
||||
$result['thumb_priority'] = array_search($result['thumb_priority'],$strings[3]);
|
||||
$result['thumb_mode'] = array_search($result['thumb_mode'],$strings[3]);
|
||||
$result['icons'] = array_search($result['icons'],$strings[2]);
|
||||
$result['icon_tool'] = array_search($result['icon_tool'],$strings[4]);
|
||||
$result['icon_mode'] = array_search($result['icon_mode'],$strings[4]);
|
||||
$result['parallel'] = array_search($result['parallel'],$pstrings);
|
||||
|
||||
// If the user didn't specify a destpath, set to default
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configure options script for re-calling Magick+ compilation options
|
||||
# required to use the Magick++ library.
|
||||
#
|
||||
#
|
||||
|
||||
prefix=/Users/johannespichler/Downloads/newTest/build
|
||||
exec_prefix=${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 '7.0.5 Q16 HDRI'
|
||||
;;
|
||||
--cflags)
|
||||
pkg-config --cflags Magick++
|
||||
;;
|
||||
--cxxflags)
|
||||
pkg-config --cflags Magick++
|
||||
;;
|
||||
--cppflags)
|
||||
pkg-config --cflags Magick++
|
||||
;;
|
||||
--ldflags)
|
||||
pkg-config --libs Magick++
|
||||
;;
|
||||
--libs)
|
||||
pkg-config --libs Magick++
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configure options script for re-calling MagickCore compilation options
|
||||
# required to use the MagickCore library.
|
||||
#
|
||||
|
||||
prefix=/Users/johannespichler/Downloads/newTest/build
|
||||
exec_prefix=${prefix}
|
||||
|
||||
usage="\
|
||||
Usage: MagickCore-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "${usage}" 1>&2
|
||||
echo "Example: gcc \`MagickCore-config --cflags --cppflags\` -o core core.c \`Magick-config --ldflags --libs\`" 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 '7.0.5 Q16 HDRI'
|
||||
;;
|
||||
--cflags)
|
||||
pkg-config --cflags MagickCore
|
||||
;;
|
||||
--cxxflags)
|
||||
pkg-config --cflags MagickCore
|
||||
;;
|
||||
--cppflags)
|
||||
pkg-config --cflags MagickCore
|
||||
;;
|
||||
--ldflags)
|
||||
pkg-config --libs MagickCore
|
||||
;;
|
||||
--libs)
|
||||
pkg-config --libs MagickCore
|
||||
;;
|
||||
--coder-path)
|
||||
echo "/Users/johannespichler/Downloads/newTest/build/lib/ImageMagick-7.0.5/modules-Q16HDRI/coders"
|
||||
;;
|
||||
--filter-path)
|
||||
echo "/Users/johannespichler/Downloads/newTest/build/lib/ImageMagick-7.0.5/modules-Q16HDRI/filters"
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configure options script for re-calling MagickWand compilation options
|
||||
# required to use the MagickWand library.
|
||||
#
|
||||
|
||||
prefix=/Users/johannespichler/Downloads/newTest/build
|
||||
exec_prefix=${prefix}
|
||||
|
||||
usage="\
|
||||
Usage: MagickWand-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "${usage}" 1>&2
|
||||
echo "Example: gcc \`MagickWand-config --cflags --cppflags\` -o wand wand.c \`MagickWand-config --ldflags --libs\`" 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 '7.0.5 Q16 HDRI'
|
||||
;;
|
||||
--cflags)
|
||||
pkg-config --cflags MagickWand
|
||||
;;
|
||||
--cxxflags)
|
||||
pkg-config --cflags MagickWand
|
||||
;;
|
||||
--cppflags)
|
||||
pkg-config --cflags MagickWand
|
||||
;;
|
||||
--ldflags)
|
||||
pkg-config --libs MagickWand
|
||||
;;
|
||||
--libs)
|
||||
pkg-config --libs MagickWand
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1 +0,0 @@
|
||||
magick
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE codermap [
|
||||
<!ELEMENT codermap (coder)*>
|
||||
<!ELEMENT coder (#PCDATA)>
|
||||
<!ATTLIST coder magick CDATA #REQUIRED>
|
||||
<!ATTLIST coder name CDATA #REQUIRED>
|
||||
]>
|
||||
<!--
|
||||
Associate an image format with the specified coder module.
|
||||
|
||||
ImageMagick has a number of coder modules to support the reading and/or
|
||||
writing of an image format (e.g. JPEG). Some coder modules support more
|
||||
than one associated image format and the mapping between an associated
|
||||
format and its respective coder module is defined in this configuration
|
||||
file. For example, the PNG coder module not only supports the PNG image
|
||||
format, but the JNG and MNG formats as well.
|
||||
-->
|
||||
<codermap>
|
||||
<!-- <coder magick="GIF87" name="GIF"/> -->
|
||||
<!-- <coder magick="JPG" name="JPEG"/> -->
|
||||
<!-- <coder magick="PGM" name="PNM"/> -->
|
||||
</codermap>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE colormap [
|
||||
<!ELEMENT colormap (color)+>
|
||||
<!ELEMENT color (#PCDATA)>
|
||||
<!ATTLIST color name CDATA "0">
|
||||
<!ATTLIST color color CDATA "rgb(0,0,0)">
|
||||
<!ATTLIST color compliance CDATA "SVG">
|
||||
]>
|
||||
<!--
|
||||
Associate a color name with its red, green, blue, and alpha intensities.
|
||||
|
||||
A number of methods and options require a color parameter. It is often
|
||||
convenient to refer to a color by name (e.g. white) rather than by hex
|
||||
value (e.g. #fff). This file maps a color name to its equivalent red,
|
||||
green, blue, and alpha intensities (e.g. for white, red = 255, green =
|
||||
255, blue = 255, and alpha = 0).
|
||||
-->
|
||||
<colormap>
|
||||
<!-- <color name="none" color="rgba(0,0,0,0)" compliance="SVG, XPM"/> -->
|
||||
<!-- <color name="black" color="rgb(0,0,0)" compliance="SVG, X11, XPM"/> -->
|
||||
<!-- <color name="red" color="rgb(255,0,0)" compliance="SVG, X11, XPM"/> -->
|
||||
<!-- <color name="magenta" color="rgb(255,0,255)" compliance="SVG, X11, XPM"/> -->
|
||||
<!-- <color name="green" color="rgb(0,128,0)" compliance="SVG"/> -->
|
||||
<!-- <color name="cyan" color="rgb(0,255,255)" compliance="SVG, X11, XPM"/> -->
|
||||
<!-- <color name="blue" color="rgb(0,0,255)" compliance="SVG, X11, XPM"/> -->
|
||||
<!-- <color name="yellow" color="rgb(255,255,0)" compliance="SVG, X11, XPM"/> -->
|
||||
<!-- <color name="white" color="rgb(255,255,255)" compliance="SVG, X11"/> -->
|
||||
</colormap>
|
||||
@@ -1,125 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE delegatemap [
|
||||
<!ELEMENT delegatemap (delegate)+>
|
||||
<!ELEMENT delegate (#PCDATA)>
|
||||
<!ATTLIST delegate decode CDATA #IMPLIED>
|
||||
<!ATTLIST delegate encode CDATA #IMPLIED>
|
||||
<!ATTLIST delegate mode CDATA #IMPLIED>
|
||||
<!ATTLIST delegate spawn CDATA #IMPLIED>
|
||||
<!ATTLIST delegate stealth CDATA #IMPLIED>
|
||||
<!ATTLIST delegate thread-support CDATA #IMPLIED>
|
||||
<!ATTLIST delegate command CDATA #REQUIRED>
|
||||
]>
|
||||
<!--
|
||||
Delegate command file.
|
||||
|
||||
Commands which specify
|
||||
|
||||
decode="in_format" encode="out_format"
|
||||
|
||||
specify the rules for converting from in_format to out_format. Use these
|
||||
rules to translate directly between formats.
|
||||
|
||||
Commands which specify only
|
||||
|
||||
decode="in_format"
|
||||
|
||||
specify the rules for converting from in_format to some format that
|
||||
ImageMagick automatically recognizes. Use these rules to decode formats.
|
||||
|
||||
Commands which specify only
|
||||
|
||||
encode="out_format"
|
||||
|
||||
specify the rules for an "encoder" which may accept any input format.
|
||||
|
||||
The substitution rules are as follows:
|
||||
|
||||
%a authentication passphrase
|
||||
%b image file size in bytes
|
||||
%g image geometry
|
||||
%h image rows (height)
|
||||
%i input image filename
|
||||
%# input image signature
|
||||
%m input image format
|
||||
%o output image filename
|
||||
%p page number
|
||||
%q input image depth
|
||||
%s scene number
|
||||
%u unique temporary filename
|
||||
%w image columns (width)
|
||||
%x input image x resolution
|
||||
%y input image y resolution
|
||||
|
||||
Set option delegate:bimodal=true to process bimodal delegates otherwise they
|
||||
are ignored.
|
||||
|
||||
If stealth="True" the delegate is not listed in user requested
|
||||
"-list delegate" listings. These are typically special internal delegates.
|
||||
|
||||
If spawn="True", ImageMagick does not wait for the delegate to finish, nor
|
||||
will it read any output image.
|
||||
-->
|
||||
<delegatemap>
|
||||
<delegate decode="bpg" command=""bpgdec" -b 16 -o "%o.png" "%i"; /bin/mv "%o.png" "%o""/>
|
||||
<delegate decode="png" encode="bpg" command=""bpgenc" -b 12 -o "%o" "%i""/>
|
||||
<delegate decode="blender" command=""blender" -b "%i" -F PNG -o "%o""\n"magick" convert -concatenate "%o*.png" "%o""/>
|
||||
<delegate decode="browse" stealth="True" spawn="True" command=""xdg-open" http://www.imagemagick.org/; /bin/rm "%i""/>
|
||||
<delegate decode="cdr" command=""uniconvertor" "%i" "%o.svg"; /bin/mv "%o.svg" "%o""/>
|
||||
<delegate decode="cgm" command=""uniconvertor" "%i" "%o.svg"; /bin/mv "%o.svg" "%o""/>
|
||||
<delegate decode="https" command=""curl" -s -k -L -o "%o" "https:%M""/>
|
||||
<delegate decode="doc" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="docx" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="dng:decode" command=""ufraw-batch" --silent --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i""/>
|
||||
<delegate decode="dot" command='"dot" -Tsvg "%i" -o "%o"' />
|
||||
<delegate decode="dvi" command=""dvips" -sstdout=%%stderr -o "%o" "%i""/>
|
||||
<delegate decode="dxf" command=""uniconvertor" "%i" "%o.svg"; /bin/mv "%o.svg" "%o""/>
|
||||
<delegate decode="edit" stealth="True" command=""xterm" -title "Edit Image Comment" -e vi "%o""/>
|
||||
<delegate decode="eps" encode="pdf" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>
|
||||
<delegate decode="eps" encode="ps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ps2write" "-sOutputFile=%o" "-f%i""/>
|
||||
<delegate decode="fig" command=""uniconvertor" "%i" "%o.svg"; /bin/mv "%o.svg" "%o""/>
|
||||
<delegate decode="hpg" command=""hp2xx" -sstdout=%%stderr -m eps -f `basename "%o"` "%i"; /bin/mv -f `basename "%o"` "%o""/>
|
||||
<delegate decode="hpgl" command=""hp2xx" -sstdout=%%stderr -m eps -f `basename "%o"` "%i"; /bin/mv -f `basename "%o"` "%o""/>
|
||||
<delegate decode="htm" command=""html2ps" -U -o "%o" "%i""/>
|
||||
<delegate decode="html" command=""html2ps" -U -o "%o" "%i""/>
|
||||
<delegate decode="ilbm" command=""ilbmtoppm" "%i" > "%o""/>
|
||||
<delegate decode="jpg" encode="lep" mode="encode" command=""lepton" "%i" "%o""/>
|
||||
<delegate decode="jxr" command="/bin/mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.pnm"; /bin/mv "%i.jxr" "%i"; /bin/mv "%o.pnm" "%o""/>
|
||||
<delegate decode="lep" mode="decode" command=""lepton" "%i" "%o""/>
|
||||
<delegate decode="miff" encode="show" spawn="True" command=""magick" display -immutable -delay 0 -title "%M" "%i""/>
|
||||
<delegate decode="miff" encode="win" stealth="True" spawn="True" command=""magick" display -immutable -delay 0 -title "%M" "%i""/>
|
||||
<delegate decode="mpeg:decode" command=""ffmpeg" -nostdin -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%u""/>
|
||||
<delegate decode="odt" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="pcl:cmyk" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
||||
<delegate decode="pcl:color" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
||||
<delegate decode="pcl:mono" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
||||
<delegate decode="pdf" encode="eps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sPDFPassword="%a" "-sDEVICE=eps2write" "-sOutputFile=%o" "-f%i""/>
|
||||
<delegate decode="pdf" encode="ps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ps2write" -sPDFPassword="%a" "-sOutputFile=%o" "-f%i""/>
|
||||
<delegate decode="png" encode="webp" command=""cwebp" -quiet %Q "%i" -o "%o""/>
|
||||
<delegate decode="pnm" encode="ilbm" mode="encode" command=""ppmtoilbm" -24if "%i" > "%o""/>
|
||||
<delegate decode="bmp" encode="jxr" command="/bin/mv "%i" "%i.bmp"; "JxrEncApp" -i "%i.bmp" -o "%o.jxr"; /bin/mv "%i.bmp" "%i"; /bin/mv "%o.jxr" "%o""/>
|
||||
<delegate decode="bmp" encode="wdp" command="/bin/mv "%i" "%i.bmp"; "JxrEncApp" -i "%i.bmp" -o "%o.jxr"; /bin/mv "%i.bmp" "%i"; /bin/mv "%o.jxr" "%o""/>
|
||||
<delegate decode="ppt" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="pptx" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="ps" encode="prt" command='"/usr/bin/lpr" "%i"'/>
|
||||
<delegate decode="ps:alpha" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
||||
<delegate decode="ps:cmyk" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
||||
<delegate decode="ps:color" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pnmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
||||
<delegate decode="ps" encode="eps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=eps2write" "-sOutputFile=%o" "-f%i""/>
|
||||
<delegate decode="ps" encode="pdf" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>
|
||||
<delegate decode="ps" encode="print" mode="encode" command="lpr "%i""/>
|
||||
<delegate decode="ps:mono" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
||||
<delegate decode="shtml" command=""html2ps" -U -o "%o" "%i""/>
|
||||
<delegate decode="sid" command=""mrsidgeodecode" -if sid -i "%i" -of tif -o "%o" > "%u""/>
|
||||
<delegate decode="svg" command=""rsvg-convert" -o "%o" "%i""/>
|
||||
<delegate decode="svg:decode" stealth="True" command=""inkscape" "%s" --export-png="%s" --export-dpi="%s" --export-background="%s" --export-background-opacity="%s" > "%s" 2>&1"/>
|
||||
<delegate decode="tiff" encode="launch" mode="encode" command=""gimp" "%i""/>
|
||||
<delegate decode="wdp" command="/bin/mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.bmp"; /bin/mv "%i.jxr" "%i"; /bin/mv "%o.bmp" "%o""/>
|
||||
<delegate decode="webp" command=""dwebp" -pam "%i" -o "%o""/>
|
||||
<delegate decode="xls" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="xlsx" command=""soffice" --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /bin/mv "%i.pdf" "%o""/>
|
||||
<delegate decode="xps:cmyk" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=bmpsep8" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
||||
<delegate decode="xps:color" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
||||
<delegate decode="xps:mono" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
||||
<delegate encode="mpeg:encode" stealth="True" command=""ffmpeg" -nostdin -v -1 -i "%M%%d.jpg" "%u.%m" 2> "%u""/>
|
||||
</delegatemap>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE logmap [
|
||||
<!ELEMENT logmap (log)+>
|
||||
<!ELEMENT log (#PCDATA)>
|
||||
<!ATTLIST log events CDATA #IMPLIED>
|
||||
<!ATTLIST log output CDATA #IMPLIED>
|
||||
<!ATTLIST log filename CDATA #IMPLIED>
|
||||
<!ATTLIST log generations CDATA #IMPLIED>
|
||||
<!ATTLIST log limit CDATA #IMPLIED>
|
||||
<!ATTLIST log format CDATA #IMPLIED>
|
||||
]>
|
||||
<!--
|
||||
The format of the log is defined by embedding special format characters:
|
||||
|
||||
%c client
|
||||
%d domain
|
||||
%e event
|
||||
%f function
|
||||
%g generation
|
||||
%i thread id
|
||||
%l line
|
||||
%m module
|
||||
%n log name
|
||||
%p process id
|
||||
%r real CPU time
|
||||
%t wall clock time
|
||||
%u user CPU time
|
||||
%v version
|
||||
%% percent sign
|
||||
\n newline
|
||||
\r carriage return
|
||||
-->
|
||||
<logmap>
|
||||
<log events="None"/>
|
||||
<log output="console"/>
|
||||
<log filename="Magick-%g.log"/>
|
||||
<log generations="3"/>
|
||||
<log limit="2000"/>
|
||||
<log format="%t %r %u %v %d %c[%p]: %m/%f/%l/%d\n %e"/>
|
||||
</logmap>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE magicmap [
|
||||
<!ELEMENT magicmap (magic)+>
|
||||
<!ELEMENT magic (#PCDATA)>
|
||||
<!ATTLIST magic name CDATA #REQUIRED>
|
||||
<!ATTLIST magic offset CDATA "0">
|
||||
<!ATTLIST magic target CDATA #REQUIRED>
|
||||
]>
|
||||
<!--
|
||||
Associate an image format with a unique identifier.
|
||||
|
||||
Many image formats have identifiers that uniquely identify a particular
|
||||
image format. For example, the GIF image format always begins with GIF8
|
||||
as the first 4 characters of the image. ImageMagick uses this information
|
||||
to quickly determine the type of image it is dealing with when it reads
|
||||
an image.
|
||||
-->
|
||||
<magicmap>
|
||||
<!-- <magic name="GIF" offset="0" target="GIF8"/> -->
|
||||
<!-- <magic name="JPEG" offset="0" target="\377\330\377"/> -->
|
||||
<!-- <magic name="PNG" offset="0" target="\211PNG\r\n\032\n"/> -->
|
||||
<!-- <magic name="TIFF" offset="0" target="\115\115\000\052"/> -->
|
||||
</magicmap>
|
||||
@@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policymap [
|
||||
<!ELEMENT policymap (policy)+>
|
||||
<!ELEMENT policy (#PCDATA)>
|
||||
<!ATTLIST policy domain (cache|delegate|coder|path|resource|system) #IMPLIED>
|
||||
<!ATTLIST policy name CDATA #IMPLIED>
|
||||
<!ATTLIST policy rights CDATA #IMPLIED>
|
||||
<!ATTLIST policy stealth CDATA #IMPLIED>
|
||||
<!ATTLIST policy cache CDATA #IMPLIED>
|
||||
<!ATTLIST policy coder CDATA #IMPLIED>
|
||||
<!ATTLIST policy delegate CDATA #IMPLIED>
|
||||
<!ATTLIST policy pattern CDATA #IMPLIED>
|
||||
<!ATTLIST policy path CDATA #IMPLIED>
|
||||
<!ATTLIST policy system CDATA #IMPLIED>
|
||||
<!ATTLIST policy value CDATA #IMPLIED>
|
||||
]>
|
||||
<!--
|
||||
Configure ImageMagick policies.
|
||||
|
||||
Domains include system, delegate, coder, filter, path, or resource.
|
||||
|
||||
Rights include none, read, write, execute and all. Use | to combine them,
|
||||
for example: "read | write" to permit read from, or write to, a path.
|
||||
|
||||
Use a glob expression as a pattern.
|
||||
|
||||
Suppose we do not want users to process MPEG video images:
|
||||
|
||||
<policy domain="delegate" rights="none" pattern="mpeg:decode" />
|
||||
|
||||
Here we do not want users reading images from HTTP:
|
||||
|
||||
<policy domain="coder" rights="none" pattern="HTTP" />
|
||||
|
||||
Lets prevent users from executing any image filters:
|
||||
|
||||
<policy domain="filter" rights="none" pattern="*" />
|
||||
|
||||
The /repository file system is restricted to read only. We use a glob
|
||||
expression to match all paths that start with /repository:
|
||||
|
||||
<policy domain="path" rights="read" pattern="/repository/*" />
|
||||
|
||||
Lets prevent users from executing any image filters:
|
||||
|
||||
<policy domain="filter" rights="none" pattern="*" />
|
||||
|
||||
Any large image is cached to disk rather than memory:
|
||||
|
||||
<policy domain="resource" name="area" value="1GP"/>
|
||||
|
||||
Define arguments for the memory, map, area, width, height and disk resources
|
||||
with SI prefixes (.e.g 100MB). In addition, resource policies are maximums
|
||||
for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB
|
||||
exceeds policy maximum so memory limit is 1GB).
|
||||
|
||||
Rules are processed in order. Here we want to restrict ImageMagick to only
|
||||
read or write a small subset of proven web-safe image types:
|
||||
|
||||
<policy domain="delegate" rights="none" pattern="*" />
|
||||
<policy domain="coder" rights="none" pattern="*" />
|
||||
<policy domain="coder" rights="read|write" pattern="{GIF,JPEG,PNG,WEBP}" />
|
||||
-->
|
||||
<policymap>
|
||||
<!-- <policy domain="system" name="shred" value="2"/> -->
|
||||
<!-- <policy domain="system" name="precision" value="6"/> -->
|
||||
<!-- <policy domain="system" name="memory-map" value="anonymous"/> -->
|
||||
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
|
||||
<!-- <policy domain="resource" name="memory" value="2GiB"/> -->
|
||||
<!-- <policy domain="resource" name="map" value="4GiB"/> -->
|
||||
<!-- <policy domain="resource" name="width" value="10MP"/> -->
|
||||
<!-- <policy domain="resource" name="height" value="10MP"/> -->
|
||||
<!-- <policy domain="resource" name="area" value="100MP"/> -->
|
||||
<!-- <policy domain="resource" name="disk" value="16EiB"/> -->
|
||||
<!-- <policy domain="resource" name="file" value="768"/> -->
|
||||
<!-- <policy domain="resource" name="thread" value="4"/> -->
|
||||
<!-- <policy domain="resource" name="throttle" value="0"/> -->
|
||||
<!-- <policy domain="resource" name="time" value="3600"/> -->
|
||||
<!-- <policy domain="resource" name="time" value="3600"/> -->
|
||||
<!-- <policy domain="coder" rights="none" pattern="MVG" /> -->
|
||||
<!-- <policy domain="delegate" rights="none" pattern="HTTPS" /> -->
|
||||
<!-- <policy domain="path" rights="none" pattern="@*" /> -->
|
||||
<!-- <policy domain="cache" name="memory-map" value="anonymous"/> -->
|
||||
<!-- <policy domain="cache" name="synchronize" value="True"/> -->
|
||||
<policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
|
||||
</policymap>
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE quantization-tables [
|
||||
<!ELEMENT quantization-tables (table)+>
|
||||
<!ELEMENT table (description , levels)>
|
||||
<!ELEMENT description (CDATA)>
|
||||
<!ELEMENT levels (CDATA)>
|
||||
<!ATTLIST table slot ID #REQUIRED>
|
||||
<!ATTLIST levels width CDATA #REQUIRED>
|
||||
<!ATTLIST levels height CDATA #REQUIRED>
|
||||
<!ATTLIST levels divisor CDATA #REQUIRED>
|
||||
]>
|
||||
<!--
|
||||
JPEG quantization table created by Dr. Nicolas Robidoux, Senior Research
|
||||
Scientist at Phase One (www.phaseone.com) for use with 2x2 Chroma
|
||||
subsampling and (IJG-style, hence ImageMagick-style) quality level
|
||||
around 75.
|
||||
|
||||
It is based on the one recommended in
|
||||
|
||||
Relevance of human vision to JPEG-DCT compression by Stanley A. Klein,
|
||||
Amnon D. Silverstein and Thom Carney. In Human Vision, Visual
|
||||
Processing and Digital Display III, 1992.
|
||||
|
||||
for 1 minute per pixel viewing.
|
||||
|
||||
Specifying only one table in this xml file has two effects when used with
|
||||
the ImageMagick option
|
||||
|
||||
-define jpeg:q-table=PATH/TO/THIS/FILE
|
||||
|
||||
1) This quantization table is automatically used for all three channels;
|
||||
|
||||
2) Only one copy is embedded in the JPG file, which saves a few bits
|
||||
(only worthwhile for very small thumbnails).
|
||||
-->
|
||||
<quantization-tables>
|
||||
<table slot="0" alias="luma">
|
||||
<description>Luma Quantization Table</description>
|
||||
<levels width="8" height="8" divisor="1">
|
||||
16, 16, 16, 18, 25, 37, 56, 85,
|
||||
16, 17, 20, 27, 34, 40, 53, 75,
|
||||
16, 20, 24, 31, 43, 62, 91, 135,
|
||||
18, 27, 31, 40, 53, 74, 106, 156,
|
||||
25, 34, 43, 53, 69, 94, 131, 189,
|
||||
37, 40, 62, 74, 94, 124, 169, 238,
|
||||
56, 53, 91, 106, 131, 169, 226, 311,
|
||||
85, 75, 135, 156, 189, 238, 311, 418
|
||||
</levels>
|
||||
</table>
|
||||
<!--
|
||||
If you want to use a different quantization table for Chroma (say), just add
|
||||
|
||||
<table slot="1" alias="chroma">
|
||||
<description>Chroma Quantization Table</description>
|
||||
INSERT 64 POSITIVE INTEGERS HERE, COMMA-SEPARATED
|
||||
</levels>
|
||||
</table>
|
||||
|
||||
here (but outside of these comments).
|
||||
-->
|
||||
</quantization-tables>
|
||||
|
||||
@@ -1,334 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE thresholds [
|
||||
<!ELEMENT thresholds (threshold)+>
|
||||
<!ELEMENT threshold (description , levels)>
|
||||
<!ELEMENT description (CDATA)>
|
||||
<!ELEMENT levels (CDATA)>
|
||||
<!ATTLIST threshold map ID #REQUIRED>
|
||||
<!ATTLIST levels width CDATA #REQUIRED>
|
||||
<!ATTLIST levels height CDATA #REQUIRED>
|
||||
<!ATTLIST levels divisor CDATA #REQUIRED>
|
||||
]>
|
||||
<!--
|
||||
Threshold Maps for Ordered Posterized Dither
|
||||
|
||||
Each "<threshold>" element defines the map name, description, and an array
|
||||
of "levels" used to provide the threshold map for ordered dithering and
|
||||
digital halftoning.
|
||||
|
||||
The "alias" attribute provides a backward compatible name for this threshold
|
||||
map (pre-dating IM v6.2.9-6), and are deprecated.
|
||||
|
||||
The description is a english description of what the threshold map achieves
|
||||
and is only used for 'listing' the maps.
|
||||
|
||||
The map itself is a rectangular array of integers or threshold "levels"
|
||||
of the given "width" and "height" declared within the enclosing <levels>
|
||||
element. That is "width*height" integers or "levels" *must* be provided
|
||||
within each map.
|
||||
|
||||
Each of the "levels" integer values (each value representing the threshold
|
||||
intensity "level/divisor" at which that pixel is turned on. The "levels"
|
||||
integers given can be any postive integers between "0" and the "divisor",
|
||||
excluding those limits.
|
||||
|
||||
The "divisor" not only defines the upper limit and threshold divisor for each
|
||||
"level" but also the total number of pseudo-levels the threshold mapping
|
||||
creates and fills with a dither pattern. That is a ordered bitmap dither
|
||||
of a pure greyscale gradient will use a maximum of "divisor" ordered bitmap
|
||||
patterns, including the patterns with all the pixels 'on' and all the pixel
|
||||
'off'. It may define less patterns than that, but the color channels will
|
||||
be thresholded in units based on "divisor".
|
||||
|
||||
Alternatively for a multi-level posterization, ImageMagick inserts
|
||||
"divisor-2" dither patterns (as defined by the threshold map) between each of
|
||||
channel color level produced.
|
||||
|
||||
For example the map "o2x2" has a divisor of 5, which will define 3 bitmap
|
||||
patterns plus the patterns with all pixels 'on' and 'off'. A greyscale
|
||||
gradient will thus have 5 distinct areas.
|
||||
-->
|
||||
<thresholds>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Minimal Dither and Non-Dither Threshold Maps
|
||||
-->
|
||||
<threshold map="threshold" alias="1x1">
|
||||
<description>Threshold 1x1 (non-dither)</description>
|
||||
<levels width="1" height="1" divisor="2">
|
||||
1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="checks" alias="2x1">
|
||||
<description>Checkerboard 2x1 (dither)</description>
|
||||
<levels width="2" height="2" divisor="3">
|
||||
1 2
|
||||
2 1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
(dispersed) Ordered Dither Patterns
|
||||
-->
|
||||
<threshold map="o2x2" alias="2x2">
|
||||
<description>Ordered 2x2 (dispersed)</description>
|
||||
<levels width="2" height="2" divisor="5">
|
||||
1 3
|
||||
4 2
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="o3x3" alias="3x3">
|
||||
<description>Ordered 3x3 (dispersed)</description>
|
||||
<levels width="3" height="3" divisor="10">
|
||||
3 7 4
|
||||
6 1 9
|
||||
2 8 5
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="o4x4" alias="4x4">
|
||||
<!--
|
||||
From "Dithering Algorithms"
|
||||
http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT
|
||||
-->
|
||||
<description>Ordered 4x4 (dispersed)</description>
|
||||
<levels width="4" height="4" divisor="17">
|
||||
1 9 3 11
|
||||
13 5 15 7
|
||||
4 12 2 10
|
||||
16 8 14 6
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="o8x8" alias="8x8">
|
||||
<!-- Extracted from original 'OrderedDither()' Function -->
|
||||
<description>Ordered 8x8 (dispersed)</description>
|
||||
<levels width="8" height="8" divisor="65">
|
||||
1 49 13 61 4 52 16 64
|
||||
33 17 45 29 36 20 48 32
|
||||
9 57 5 53 12 60 8 56
|
||||
41 25 37 21 44 28 40 24
|
||||
3 51 15 63 2 50 14 62
|
||||
35 19 47 31 34 18 46 30
|
||||
11 59 7 55 10 58 6 54
|
||||
43 27 39 23 42 26 38 22
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Halftones - Angled 45 degrees
|
||||
|
||||
Initially added to ImageMagick by Glenn Randers-Pehrson, IM v6.2.8-6,
|
||||
modified to be more symmetrical with intensity by Anthony, IM v6.2.9-7
|
||||
|
||||
These patterns initially start as circles, but then form diamonds
|
||||
pattern at the 50% threshold level, before forming negated circles,
|
||||
as it approached the other threshold extereme.
|
||||
-->
|
||||
<threshold map="h4x4a" alias="4x1">
|
||||
<description>Halftone 4x4 (angled)</description>
|
||||
<levels width="4" height="4" divisor="9">
|
||||
4 2 7 5
|
||||
3 1 8 6
|
||||
7 5 4 2
|
||||
8 6 3 1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="h6x6a" alias="6x1">
|
||||
<description>Halftone 6x6 (angled)</description>
|
||||
<levels width="6" height="6" divisor="19">
|
||||
14 13 10 8 2 3
|
||||
16 18 12 7 1 4
|
||||
15 17 11 9 6 5
|
||||
8 2 3 14 13 10
|
||||
7 1 4 16 18 12
|
||||
9 6 5 15 17 11
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="h8x8a" alias="8x1">
|
||||
<description>Halftone 8x8 (angled)</description>
|
||||
<levels width="8" height="8" divisor="33">
|
||||
13 7 8 14 17 21 22 18
|
||||
6 1 3 9 28 31 29 23
|
||||
5 2 4 10 27 32 30 24
|
||||
16 12 11 15 20 26 25 19
|
||||
17 21 22 18 13 7 8 14
|
||||
28 31 29 23 6 1 3 9
|
||||
27 32 30 24 5 2 4 10
|
||||
20 26 25 19 16 12 11 15
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Halftones - Orthogonally Aligned, or Un-angled
|
||||
|
||||
Initially added by Anthony Thyssen, IM v6.2.9-5 using techniques from
|
||||
"Dithering & Halftoning" by Gernot Haffmann
|
||||
http://www.fho-emden.de/~hoffmann/hilb010101.pdf
|
||||
|
||||
These patterns initially start as circles, but then form square
|
||||
pattern at the 50% threshold level, before forming negated circles,
|
||||
as it approached the other threshold extereme.
|
||||
-->
|
||||
<threshold map="h4x4o">
|
||||
<description>Halftone 4x4 (orthogonal)</description>
|
||||
<levels width="4" height="4" divisor="17">
|
||||
7 13 11 4
|
||||
12 16 14 8
|
||||
10 15 6 2
|
||||
5 9 3 1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="h6x6o">
|
||||
<description>Halftone 6x6 (orthogonal)</description>
|
||||
<levels width="6" height="6" divisor="37">
|
||||
7 17 27 14 9 4
|
||||
21 29 33 31 18 11
|
||||
24 32 36 34 25 22
|
||||
19 30 35 28 20 10
|
||||
8 15 26 16 6 2
|
||||
5 13 23 12 3 1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="h8x8o">
|
||||
<description>Halftone 8x8 (orthogonal)</description>
|
||||
<levels width="8" height="8" divisor="65">
|
||||
7 21 33 43 36 19 9 4
|
||||
16 27 51 55 49 29 14 11
|
||||
31 47 57 61 59 45 35 23
|
||||
41 53 60 64 62 52 40 38
|
||||
37 44 58 63 56 46 30 22
|
||||
15 28 48 54 50 26 17 10
|
||||
8 18 34 42 32 20 6 2
|
||||
5 13 25 39 24 12 3 1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="h16x16o">
|
||||
<!--
|
||||
Direct extract from "Dithering & Halftoning" by Gernot Haffmann.
|
||||
This may need some fine tuning for symmetry of the halftone dots,
|
||||
as it was a mathematically formulated pattern.
|
||||
-->
|
||||
<description>Halftone 16x16 (orthogonal)</description>
|
||||
<levels width="16" height="16" divisor="257">
|
||||
4 12 24 44 72 100 136 152 150 134 98 70 42 23 11 3
|
||||
7 16 32 52 76 104 144 160 158 142 102 74 50 31 15 6
|
||||
19 27 40 60 92 132 168 180 178 166 130 90 58 39 26 18
|
||||
36 48 56 80 124 176 188 204 203 187 175 122 79 55 47 35
|
||||
64 68 84 116 164 200 212 224 223 211 199 162 114 83 67 63
|
||||
88 96 112 156 192 216 232 240 239 231 214 190 154 111 95 87
|
||||
108 120 148 184 208 228 244 252 251 243 226 206 182 147 119 107
|
||||
128 140 172 196 219 235 247 256 255 246 234 218 194 171 139 127
|
||||
126 138 170 195 220 236 248 253 254 245 233 217 193 169 137 125
|
||||
106 118 146 183 207 227 242 249 250 241 225 205 181 145 117 105
|
||||
86 94 110 155 191 215 229 238 237 230 213 189 153 109 93 85
|
||||
62 66 82 115 163 198 210 221 222 209 197 161 113 81 65 61
|
||||
34 46 54 78 123 174 186 202 201 185 173 121 77 53 45 33
|
||||
20 28 37 59 91 131 167 179 177 165 129 89 57 38 25 17
|
||||
8 13 29 51 75 103 143 159 157 141 101 73 49 30 14 5
|
||||
1 9 21 43 71 99 135 151 149 133 97 69 41 22 10 2
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Halftones - Orthogonally Expanding Circle Patterns
|
||||
|
||||
Added by Glenn Randers-Pehrson, 4 Nov 2010, ImageMagick 6.6.5-6
|
||||
|
||||
Rather than producing a diamond 50% threshold pattern, these
|
||||
continue to generate larger (overlapping) circles. They are
|
||||
more like a true halftone pattern formed by covering a surface
|
||||
with either pure white or pure black circular dots.
|
||||
|
||||
WARNING: true halftone patterns only use true circles even in
|
||||
areas of highly varying intensity. Threshold dither patterns
|
||||
can generate distorted circles in such areas.
|
||||
-->
|
||||
|
||||
<threshold map="c5x5b" alias="c5x5">
|
||||
<description>Circles 5x5 (black)</description>
|
||||
<levels width="5" height="5" divisor="26">
|
||||
1 21 16 15 4
|
||||
5 17 20 19 14
|
||||
6 21 25 24 12
|
||||
7 18 22 23 11
|
||||
2 8 9 10 3
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
|
||||
<threshold map="c5x5w">
|
||||
<description>Circles 5x5 (white)</description>
|
||||
<levels width="5" height="5" divisor="26">
|
||||
25 21 10 11 22
|
||||
20 9 6 7 12
|
||||
19 5 1 2 13
|
||||
18 8 4 3 14
|
||||
24 17 16 15 23
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="c6x6b" alias="c6x6">
|
||||
<description>Circles 6x6 (black)</description>
|
||||
<levels width="6" height="6" divisor="37">
|
||||
1 5 14 13 12 4
|
||||
6 22 28 27 21 11
|
||||
15 29 35 34 26 20
|
||||
16 30 36 33 25 19
|
||||
7 23 31 32 24 10
|
||||
2 8 17 18 9 3
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="c6x6w">
|
||||
<description>Circles 6x6 (white)</description>
|
||||
<levels width="6" height="6" divisor="37">
|
||||
36 32 23 24 25 33
|
||||
31 15 9 10 16 26
|
||||
22 8 2 3 11 17
|
||||
21 7 1 4 12 18
|
||||
30 14 6 5 13 27
|
||||
35 29 20 19 28 34
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
<threshold map="c7x7b" alias="c7x7">
|
||||
<description>Circles 7x7 (black)</description>
|
||||
<levels width="7" height="7" divisor="50">
|
||||
3 9 18 28 17 8 2
|
||||
10 24 33 39 32 23 7
|
||||
19 34 44 48 43 31 16
|
||||
25 40 45 49 47 38 27
|
||||
20 35 41 46 42 29 15
|
||||
11 21 36 37 28 22 6
|
||||
4 12 13 26 14 5 1
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
|
||||
<threshold map="c7x7w">
|
||||
<description>Circles 7x7 (white)</description>
|
||||
<levels width="7" height="7" divisor="50">
|
||||
47 41 32 22 33 42 48
|
||||
40 26 17 11 18 27 43
|
||||
31 16 6 2 7 19 34
|
||||
25 10 5 1 3 12 23
|
||||
30 15 9 4 8 20 35
|
||||
39 29 14 13 21 28 44
|
||||
46 38 37 24 36 45 49
|
||||
</levels>
|
||||
</threshold>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Special Purpose Dithers
|
||||
-->
|
||||
|
||||
</thresholds>
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE typemap [
|
||||
<!ELEMENT typemap (type)+>
|
||||
<!ELEMENT type (#PCDATA)>
|
||||
<!ELEMENT include (#PCDATA)>
|
||||
<!ATTLIST type name CDATA #REQUIRED>
|
||||
<!ATTLIST type fullname CDATA #IMPLIED>
|
||||
<!ATTLIST type fullname="" family CDATA #IMPLIED>
|
||||
<!ATTLIST type foundry CDATA #IMPLIED>
|
||||
<!ATTLIST type weight CDATA #IMPLIED>
|
||||
<!ATTLIST type style CDATA #IMPLIED>
|
||||
<!ATTLIST type stretch CDATA #IMPLIED>
|
||||
<!ATTLIST type format CDATA #IMPLIED>
|
||||
<!ATTLIST type metrics CDATA #IMPLIED>
|
||||
<!ATTLIST type glyphs CDATA #REQUIRED>
|
||||
<!ATTLIST type version CDATA #IMPLIED>
|
||||
<!ATTLIST include file CDATA #REQUIRED>
|
||||
]>
|
||||
<typemap>
|
||||
<type name="DejaVu-LGC-Sans-Bold" fullname="DejaVu LGC Sans Bold" family="DejaVuGC Sans" style="Normal" stretch="Normal" weight="700" glyphs="DejaVuLGCSans-Bold.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Bold-Oblique" fullname="DejaVu LGC Sans Bold Oblique" family="DejaVuGC Sans" style="Oblique" stretch="Normal" weight="700" glyphs="DejaVuLGCSans-BoldOblique.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Book" fullname="DejaVu LGC Sans Book" family="DejaVuGC Sans" style="Normal" stretch="Normal" weight="400" glyphs="DejaVuLGCSans.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Condensed" fullname="DejaVu LGC Sans Condensed" family="DejaVuGC Sans" style="Normal" stretch="SemiCondensed" weight="400" glyphs="DejaVuLGCSansCondensed.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Condensed-Bold" fullname="DejaVu LGC Sans Condensed Bold" family="DejaVuGC Sans" style="Normal" stretch="SemiCondensed" weight="700" glyphs="DejaVuLGCSansCondensed-Bold.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Condensed-Bold-Oblique" fullname="DejaVu LGC Sans Condensed Bold Oblique" family="DejaVuGC Sans" style="Oblique" stretch="SemiCondensed" weight="700" glyphs="DejaVuLGCSansCondensed-BoldOblique.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Condensed-Oblique" fullname="DejaVu LGC Sans Condensed Oblique" family="DejaVuGC Sans" style="Oblique" stretch="SemiCondensed" weight="400" glyphs="DejaVuLGCSansCondensed-Oblique.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-ExtraLight" fullname="DejaVu LGC Sans ExtraLight" family="DejaVuGC Sans" style="Normal" stretch="Normal" weight="200" glyphs="DejaVuLGCSans-ExtraLight.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Mono-Bold" fullname="DejaVu LGC Sans Mono Bold" family="DejaVuGC Sans Mono" style="Normal" stretch="Normal" weight="700" glyphs="DejaVuLGCSansMono-Bold.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Mono-Bold-Oblique" fullname="DejaVu LGC Sans Mono Bold Oblique" family="DejaVuGC Sans Mono" style="Oblique" stretch="Normal" weight="700" glyphs="DejaVuLGCSansMono-BoldOblique.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Mono-Book" fullname="DejaVu LGC Sans Mono Book" family="DejaVuGC Sans Mono" style="Normal" stretch="Normal" weight="400" glyphs="DejaVuLGCSansMono.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Mono-Oblique" fullname="DejaVu LGC Sans Mono Oblique" family="DejaVuGC Sans Mono" style="Oblique" stretch="Normal" weight="400" glyphs="DejaVuLGCSansMono-Oblique.ttf"/>
|
||||
<type name="DejaVu-LGC-Sans-Oblique" fullname="DejaVu LGC Sans Oblique" family="DejaVuGC Sans" style="Oblique" stretch="Normal" weight="400" glyphs="DejaVuLGCSans-Oblique.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Bold" fullname="DejaVu LGC Serif Bold" family="DejaVuGC Serif" style="Normal" stretch="Normal" weight="700" glyphs="DejaVuLGCSerif-Bold.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Bold-Italic" fullname="DejaVu LGC Serif Bold Italic" family="DejaVuGC Serif" style="Italic" stretch="Normal" weight="700" glyphs="DejaVuLGCSerif-BoldItalic.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Book" fullname="DejaVu LGC Serif Book" family="DejaVuGC Serif" style="Normal" stretch="Normal" weight="400" glyphs="DejaVuLGCSerif.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Condensed" fullname="DejaVu LGC Serif Condensed" family="DejaVuGC Serif" style="Normal" stretch="SemiCondensed" weight="400" glyphs="DejaVuLGCSerifCondensed.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Condensed-Bold" fullname="DejaVu LGC Serif Condensed Bold" family="DejaVuGC Serif" style="Normal" stretch="SemiCondensed" weight="700" glyphs="DejaVuLGCSerifCondensed-Bold.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Condensed-Bold-Italic" fullname="DejaVu LGC Serif Condensed Bold Italic" family="DejaVuGC Serif" style="Italic" stretch="SemiCondensed" weight="700" glyphs="DejaVuLGCSerifCondensed-BoldItalic.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Condensed-Italic" fullname="DejaVu LGC Serif -Condensed Italic" family="DejaVuGC Serif" style="Italic" stretch="SemiCondensed" weight="400" glyphs="DejaVuLGCSerifCondensed-Italic.ttf"/>
|
||||
<type name="DejaVu-LGC-Serif-Italic" fullname="DejaVu LGC Serif Italic" family="DejaVuGC Serif" style="Italic" stretch="Normal" weight="400" glyphs="DejaVuLGCSerif-Italic.ttf"/>
|
||||
<type name="DejaVu-Sans-Bold" fullname="DejaVu Sans Bold" family="DejaVu Sans" style="Normal" stretch="Normal" weight="700" glyphs="DejaVuSans-Bold.ttf"/>
|
||||
<type name="DejaVu-Sans-Bold-Oblique" fullname="DejaVu Sans Bold Oblique" family="DejaVu Sans" style="Oblique" stretch="Normal" weight="700" glyphs="DejaVuSans-BoldOblique.ttf"/>
|
||||
<type name="DejaVu-Sans-Book" fullname="DejaVu Sans Book" family="DejaVu Sans" style="Normal" stretch="Normal" weight="400" glyphs="DejaVuSans.ttf"/>
|
||||
<type name="DejaVu-Sans-Condensed" fullname="DejaVu Sans Condensed" family="DejaVu Sans" style="Normal" stretch="SemiCondensed" weight="400" glyphs="DejaVuSansCondensed.ttf"/>
|
||||
<type name="DejaVu-Sans-Condensed-Bold" fullname="DejaVu Sans Condensed Bold" family="DejaVu Sans" style="Normal" stretch="SemiCondensed" weight="700" glyphs="DejaVuSansCondensed-Bold.ttf"/>
|
||||
<type name="DejaVu-Sans-Condensed-Bold-Oblique" fullname="DejaVu Sans Condensed Bold Oblique" family="DejaVu Sans" style="Oblique" stretch="SemiCondensed" weight="700" glyphs="DejaVuSansCondensed-BoldOblique.ttf"/>
|
||||
<type name="DejaVu-Sans-Condensed-Oblique" fullname="DejaVu Sans Condensed Oblique" family="DejaVu Sans" style="Oblique" stretch="SemiCondensed" weight="400" glyphs="DejaVuSansCondensed-Oblique.ttf"/>
|
||||
<type name="DejaVu-Sans-ExtraLight" fullname="DejaVu Sans ExtraLight" family="DejaVu Sans" style="Normal" stretch="Normal" weight="200" glyphs="DejaVuSans-ExtraLight.ttf"/>
|
||||
<type name="DejaVu-Sans-Mono-Bold" fullname="DejaVu Sans Mono Bold" family="DejaVu Sans Mono" style="Normal" stretch="Normal" weight="700" glyphs="DejaVuSansMono-Bold.ttf"/>
|
||||
<type name="DejaVu-Sans-Mono-Bold-Oblique" fullname="DejaVu Sans Mono Bold Oblique" family="DejaVu Sans Mono" style="Oblique" stretch="Normal" weight="700" glyphs="DejaVuSansMono-BoldOblique.ttf"/>
|
||||
<type name="DejaVu-Sans-Mono-Book" fullname="DejaVu Sans Mono Book" family="DejaVu Sans Mono" style="Normal" stretch="Normal" weight="400" glyphs="DejaVuSansMono.ttf"/>
|
||||
<type name="DejaVu-Sans-Mono-Oblique" fullname="DejaVu Sans Mono Oblique" family="DejaVu Sans Mono" style="Oblique" stretch="Normal" weight="400" glyphs="DejaVuSansMono-Oblique.ttf"/>
|
||||
<type name="DejaVu-Sans-Oblique" fullname="DejaVu Sans Oblique" family="DejaVu Sans" style="Oblique" stretch="Normal" weight="400" glyphs="DejaVuSans-Oblique.ttf"/>
|
||||
<type name="DejaVu-Serif-Bold" fullname="DejaVu Serif Bold" family="DejaVu Serif" style="Normal" stretch="Normal" weight="700" glyphs="DejaVuSerif-Bold.ttf"/>
|
||||
<type name="DejaVu-Serif-Bold-Italic" fullname="DejaVu Serif Bold Italic" family="DejaVu Serif" style="Italic" stretch="Normal" weight="700" glyphs="DejaVuSerif-BoldItalic.ttf"/>
|
||||
<type name="DejaVu-Serif-Book" fullname="DejaVu Serif Book" family="DejaVu Serif" style="Normal" stretch="Normal" weight="400" glyphs="DejaVuSerif.ttf"/>
|
||||
<type name="DejaVu-Serif-Condensed" fullname="DejaVu Serif Condensed" family="DejaVu Serif" style="Normal" stretch="SemiCondensed" weight="400" glyphs="DejaVuSerifCondensed.ttf"/>
|
||||
<type name="DejaVu-Serif-Condensed-Bold" fullname="DejaVu Serif Condensed Bold" family="DejaVu Serif" style="Normal" stretch="SemiCondensed" weight="700" glyphs="DejaVuSerifCondensed-Bold.ttf"/>
|
||||
<type name="DejaVu-Serif-Condensed-Bold-Italic" fullname="DejaVu Serif Condensed Bold Italic" family="DejaVu Serif" style="Italic" stretch="SemiCondensed" weight="700" glyphs="DejaVuSerifCondensed-BoldItalic.ttf"/>
|
||||
<type name="DejaVu-Serif-Condensed-Italic" fullname="DejaVu Serif Condensed Italic" family="DejaVu Serif" style="Italic" stretch="SemiCondensed" weight="400" glyphs="DejaVuSerifCondensed-Italic.ttf"/>
|
||||
<type name="DejaVu-Serif-Italic" fullname="DejaVu Serif Italic" family="DejaVu Serif" style="Italic" stretch="Normal" weight="400" glyphs="DejaVuSerif-Italic.ttf"/>
|
||||
</typemap>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE typemap [
|
||||
<!ELEMENT typemap (type)+>
|
||||
<!ELEMENT type (#PCDATA)>
|
||||
<!ELEMENT include (#PCDATA)>
|
||||
<!ATTLIST type name CDATA #REQUIRED>
|
||||
<!ATTLIST type fullname CDATA #IMPLIED>
|
||||
<!ATTLIST type family CDATA #IMPLIED>
|
||||
<!ATTLIST type foundry CDATA #IMPLIED>
|
||||
<!ATTLIST type weight CDATA #IMPLIED>
|
||||
<!ATTLIST type style CDATA #IMPLIED>
|
||||
<!ATTLIST type stretch CDATA #IMPLIED>
|
||||
<!ATTLIST type format CDATA #IMPLIED>
|
||||
<!ATTLIST type metrics CDATA #IMPLIED>
|
||||
<!ATTLIST type glyphs CDATA #REQUIRED>
|
||||
<!ATTLIST type version CDATA #IMPLIED>
|
||||
<!ATTLIST include file CDATA #REQUIRED>
|
||||
]>
|
||||
<typemap>
|
||||
<type name="AvantGarde-Book" fullname="AvantGarde Book" family="AvantGarde" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="a010013l.afm" glyphs="a010013l.pfb"/>
|
||||
<type name="AvantGarde-BookOblique" fullname="AvantGarde Book Oblique" family="AvantGarde" foundry="URW" weight="400" style="oblique" stretch="normal" format="type1" metrics="a010033l.afm" glyphs="a010033l.pfb"/>
|
||||
<type name="AvantGarde-Demi" fullname="AvantGarde DemiBold" family="AvantGarde" foundry="URW" weight="600" style="normal" stretch="normal" format="type1" metrics="a010015l.afm" glyphs="a010015l.pfb"/>
|
||||
<type name="AvantGarde-DemiOblique" fullname="AvantGarde DemiOblique" family="AvantGarde" foundry="URW" weight="600" style="oblique" stretch="normal" format="type1" metrics="a010035l.afm" glyphs="a010035l.pfb"/>
|
||||
<type name="Bookman-Demi" fullname="Bookman DemiBold" family="Bookman" foundry="URW" weight="600" style="normal" stretch="normal" format="type1" metrics="b018015l.afm" glyphs="b018015l.pfb"/>
|
||||
<type name="Bookman-DemiItalic" fullname="Bookman DemiBold Italic" family="Bookman" foundry="URW" weight="600" style="italic" stretch="normal" format="type1" metrics="b018035l.afm" glyphs="b018035l.pfb"/>
|
||||
<type name="Bookman-Light" fullname="Bookman Light" family="Bookman" foundry="URW" weight="300" style="normal" stretch="normal" format="type1" metrics="b018012l.afm" glyphs="b018012l.pfb"/>
|
||||
<type name="Bookman-LightItalic" fullname="Bookman Light Italic" family="Bookman" foundry="URW" weight="300" style="italic" stretch="normal" format="type1" metrics="b018032l.afm" glyphs="b018032l.pfb"/>
|
||||
<type name="Courier" fullname="Courier Regular" family="Courier" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="n022003l.afm" glyphs="n022003l.pfb"/>
|
||||
<type name="Courier-Bold" fullname="Courier Bold" family="Courier" foundry="URW" weight="700" style="normal" stretch="normal" format="type1" metrics="n022004l.afm" glyphs="n022004l.pfb"/>
|
||||
<type name="Courier-Oblique" fullname="Courier Regular Oblique" family="Courier" foundry="URW" weight="400" style="oblique" stretch="normal" format="type1" metrics="n022023l.afm" glyphs="n022023l.pfb"/>
|
||||
<type name="Courier-BoldOblique" fullname="Courier Bold Oblique" family="Courier" foundry="URW" weight="700" style="oblique" stretch="normal" format="type1" metrics="n022024l.afm" glyphs="n022024l.pfb"/>
|
||||
<type name="fixed" fullname="Helvetica Regular" family="Helvetica" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="n019003l.afm" glyphs="n019003l.pfb"/>
|
||||
<type name="Helvetica" fullname="Helvetica Regular" family="Helvetica" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="n019003l.afm" glyphs="n019003l.pfb"/>
|
||||
<type name="Helvetica-Bold" fullname="Helvetica Bold" family="Helvetica" foundry="URW" weight="700" style="normal" stretch="normal" format="type1" metrics="n019004l.afm" glyphs="n019004l.pfb"/>
|
||||
<type name="Helvetica-Oblique" fullname="Helvetica Regular Italic" family="Helvetica" foundry="URW" weight="400" style="italic" stretch="normal" format="type1" metrics="n019023l.afm" glyphs="n019023l.pfb"/>
|
||||
<type name="Helvetica-BoldOblique" fullname="Helvetica Bold Italic" family="Helvetica" foundry="URW" weight="700" style="italic" stretch="normal" format="type1" metrics="n019024l.afm" glyphs="n019024l.pfb"/>
|
||||
<type name="Helvetica-Narrow" fullname="Helvetica Narrow" family="Helvetica Narrow" foundry="URW" weight="400" style="normal" stretch="condensed" format="type1" metrics="n019043l.afm" glyphs="n019043l.pfb"/>
|
||||
<type name="Helvetica-Narrow-Oblique" fullname="Helvetica Narrow Oblique" family="Helvetica Narrow" foundry="URW" weight="400" style="oblique" stretch="condensed" format="type1" metrics="n019063l.afm" glyphs="n019063l.pfb"/>
|
||||
<type name="Helvetica-Narrow-Bold" fullname="Helvetica Narrow Bold" family="Helvetica Narrow" foundry="URW" weight="700" style="normal" stretch="condensed" format="type1" metrics="n019044l.afm" glyphs="n019044l.pfb"/>
|
||||
<type name="Helvetica-Narrow-BoldOblique" fullname="Helvetica Narrow Bold Oblique" family="Helvetica Narrow" foundry="URW" weight="700" style="oblique" stretch="condensed" format="type1" metrics="n019064l.afm" glyphs="n019064l.pfb"/>
|
||||
<type name="NewCenturySchlbk-Roman" fullname="New Century Schoolbook" family="NewCenturySchlbk" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="c059013l.afm" glyphs="c059013l.pfb"/>
|
||||
<type name="NewCenturySchlbk-Italic" fullname="New Century Schoolbook Italic" family="NewCenturySchlbk" foundry="URW" weight="400" style="italic" stretch="normal" format="type1" metrics="c059033l.afm" glyphs="c059033l.pfb"/>
|
||||
<type name="NewCenturySchlbk-Bold" fullname="New Century Schoolbook Bold" family="NewCenturySchlbk" foundry="URW" weight="700" style="normal" stretch="normal" format="type1" metrics="c059016l.afm" glyphs="c059016l.pfb"/>
|
||||
<type name="NewCenturySchlbk-BoldItalic" fullname="New Century Schoolbook Bold Italic" family="NewCenturySchlbk" foundry="URW" weight="700" style="italic" stretch="normal" format="type1" metrics="c059036l.afm" glyphs="c059036l.pfb"/>
|
||||
<type name="Palatino-Roman" fullname="Palatino Regular" family="Palatino" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="p052003l.afm" glyphs="p052003l.pfb"/>
|
||||
<type name="Palatino-Italic" fullname="Palatino Italic" family="Palatino" foundry="URW" weight="400" style="italic" stretch="normal" format="type1" metrics="p052023l.afm" glyphs="p052023l.pfb"/>
|
||||
<type name="Palatino-Bold" fullname="Palatino Bold" family="Palatino" foundry="URW" weight="700" style="normal" stretch="normal" format="type1" metrics="p052004l.afm" glyphs="p052004l.pfb"/>
|
||||
<type name="Palatino-BoldItalic" fullname="Palatino Bold Italic" family="Palatino" foundry="URW" weight="700" style="italic" stretch="normal" format="type1" metrics="p052024l.afm" glyphs="p052024l.pfb"/>
|
||||
<type name="Times-Roman" fullname="Times Regular" family="Times" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="n021003l.afm" glyphs="n021003l.pfb"/>
|
||||
<type name="Times-Bold" fullname="Times Medium" family="Times" foundry="URW" weight="700" style="normal" stretch="normal" format="type1" metrics="n021004l.afm" glyphs="n021004l.pfb"/>
|
||||
<type name="Times-Italic" fullname="Times Regular Italic" family="Times" foundry="URW" weight="400" style="italic" stretch="normal" format="type1" metrics="n021023l.afm" glyphs="n021023l.pfb"/>
|
||||
<type name="Times-BoldItalic" fullname="Times Medium Italic" family="Times" foundry="URW" weight="700" style="italic" stretch="normal" format="type1" metrics="n021024l.afm" glyphs="n021024l.pfb"/>
|
||||
<type name="Symbol" fullname="Symbol" family="Symbol" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="s050000l.afm" glyphs="s050000l.pfb" version="0.1" encoding="AdobeCustom"/>
|
||||
</typemap>
|
||||
@@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE typemap [
|
||||
<!ELEMENT typemap (type)+>
|
||||
<!ELEMENT type (#PCDATA)>
|
||||
<!ELEMENT include (#PCDATA)>
|
||||
<!ATTLIST type name CDATA #REQUIRED>
|
||||
<!ATTLIST type fullname CDATA #IMPLIED>
|
||||
<!ATTLIST type family CDATA #IMPLIED>
|
||||
<!ATTLIST type foundry CDATA #IMPLIED>
|
||||
<!ATTLIST type weight CDATA #IMPLIED>
|
||||
<!ATTLIST type style CDATA #IMPLIED>
|
||||
<!ATTLIST type stretch CDATA #IMPLIED>
|
||||
<!ATTLIST type format CDATA #IMPLIED>
|
||||
<!ATTLIST type metrics CDATA #IMPLIED>
|
||||
<!ATTLIST type glyphs CDATA #REQUIRED>
|
||||
<!ATTLIST type version CDATA #IMPLIED>
|
||||
<!ATTLIST include file CDATA #REQUIRED>
|
||||
]>
|
||||
<typemap>
|
||||
<type name="Arial" fullname="Arial" family="Arial" weight="400" style="normal" stretch="normal" glyphs="arial.ttf"/>
|
||||
<type name="Arial-Black" fullname="Arial Black" family="Arial" weight="900" style="normal" stretch="normal" glyphs="ariblk.ttf"/>
|
||||
<type name="Arial-Bold" fullname="Arial Bold" family="Arial" weight="700" style="normal" stretch="normal" glyphs="arialbd.ttf"/>
|
||||
<type name="Arial-Bold-Italic" fullname="Arial Bold Italic" family="Arial" weight="700" style="italic" stretch="normal" glyphs="arialbi.ttf"/>
|
||||
<type name="Arial-Italic" fullname="Arial Italic" family="Arial" weight="400" style="italic" stretch="normal" glyphs="ariali.ttf"/>
|
||||
<type name="Arial-Narrow" fullname="Arial Narrow" family="Arial Narrow" weight="400" style="normal" stretch="condensed" glyphs="arialn.ttf"/>
|
||||
<type name="Arial-Narrow-Bold" fullname="Arial Narrow Bold" family="Arial Narrow" weight="700" style="normal" stretch="condensed" glyphs="arialnb.ttf"/>
|
||||
<type name="Arial-Narrow-Bold-Italic" fullname="Arial Narrow Bold Italic" family="Arial Narrow" weight="700" style="italic" stretch="condensed" glyphs="arialnbi.ttf"/>
|
||||
<type name="Arial-Narrow-Italic" fullname="Arial Narrow Italic" family="Arial Narrow" weight="400" style="italic" stretch="condensed" glyphs="arnari.ttf"/>
|
||||
<type name="Arial-Narrow-Special-G1" fullname="Arial Narrow Special G1" family="Arial Narrow Special G1" weight="400" style="normal" stretch="condensed" glyphs="msgeonr1.ttf"/>
|
||||
<type name="Arial-Narrow-Special-G1-Bold" fullname="Arial Narrow Special G1 Bold" family="Arial Narrow Special G1" weight="700" style="normal" stretch="condensed" glyphs="msgeonb1.ttf"/>
|
||||
<type name="Arial-Narrow-Special-G1-Italic" fullname="Arial Narrow Special G1 Italic" family="Arial Narrow Special G1" weight="400" style="italic" stretch="condensed" glyphs="msgeoni1.ttf"/>
|
||||
<type name="Arial-Narrow-Special-G2" fullname="Arial Narrow Special G2" family="Arial Narrow Special G2" weight="400" style="normal" stretch="condensed" glyphs="msgeonr2.ttf"/>
|
||||
<type name="Arial-Narrow-Special-G2-Bold" fullname="Arial Narrow Special G2 Bold" family="Arial Narrow Special G2" weight="700" style="Narrow" stretch="normal" glyphs="msgeonb2.ttf"/>
|
||||
<type name="Arial-Narrow-Special-G2-Italic" fullname="Arial Narrow Special G2 Italic" family="Arial Narrow Special G2" weight="400" style="italic" stretch="condensed" glyphs="msgeoni2.ttf"/>
|
||||
<type name="Arial-Rounded-MT-Bold" fullname="Arial Rounded MT Bold" family="Arial Rounded MT" weight="700" style="normal" stretch="normal" glyphs="arlrdbd.ttf"/>
|
||||
<type name="Arial-Special-G1" fullname="Arial Special G1" family="Arial Special G1" weight="400" style="normal" stretch="normal" glyphs="msgeor1.ttf"/>
|
||||
<type name="Arial-Special-G1-Bold" fullname="Arial Special G1 Bold" family="Arial Special G1" weight="700" style="normal" stretch="normal" glyphs="msgeoab1.ttf"/>
|
||||
<type name="Arial-Special-G1-Bold-Italic" fullname="Arial Special G1 Bold Italic" family="Arial Special G1" weight="700" style="italic" stretch="normal" glyphs="msgeoax1.ttf"/>
|
||||
<type name="Arial-Special-G1-Italic" fullname="Arial Special G1 Italic" family="Arial Special G1" weight="400" style="italic" stretch="normal" glyphs="msgeoai1.ttf"/>
|
||||
<type name="Arial-Special-G2" fullname="Arial Special G2" family="Arial Special G2" weight="400" style="normal" stretch="normal" glyphs="msgeoar2.ttf"/>
|
||||
<type name="Arial-Special-G2-Bold" fullname="Arial Special G2 Bold" family="Arial Special G2" weight="700" style="normal" stretch="normal" glyphs="msgeoab2.ttf"/>
|
||||
<type name="Arial-Special-G2-Bold-Italic" fullname="Arial Special G2 Bold Italic" family="Arial Special G2" weight="700" style="italic" stretch="normal" glyphs="msgeoax2.ttf"/>
|
||||
<type name="Arial-Special-G2-Italic" fullname="Arial Special G2 Italic" family="Arial Special G2" weight="400" style="italic" stretch="normal" glyphs="msgeoai2.ttf"/>
|
||||
<type name="Bookman-Old-Style" fullname="Bookman Old Style" family="Bookman Old Style" weight="400" style="normal" stretch="normal" glyphs="bkmnos.ttf"/>
|
||||
<type name="Bookman-Old-Style-Bold" fullname="Bookman Old Style Bold" family="Bookman Old Style" weight="700" style="normal" stretch="normal" glyphs="bookosb.ttf"/>
|
||||
<type name="Bookman-Old-Style-Bold-Italic" fullname="Bookman Old Style Bold Italic" family="Bookman Old Style" weight="400" style="italic" stretch="normal" glyphs="bookosbi.ttf"/>
|
||||
<type name="Bookman-Old-Style-Italic" fullname="Bookman Old Style Italic" family="Bookman Old Style" weight="400" style="italic" stretch="normal" glyphs="boookosi.ttf"/>
|
||||
<type name="Century-Schoolbook" fullname="Century Schoolbook" family="Century Schoolbook" weight="400" style="normal" stretch="normal" glyphs="censcbk.ttf"/>
|
||||
<type name="Century-Schoolbook-Bold" fullname="Century Schoolbook Bold" family="Century Schoolbook" weight="700" style="normal" stretch="normal" glyphs="schlbkb.ttf"/>
|
||||
<type name="Century-Schoolbook-Bold-Italic" fullname="Century Schoolbook Bold Italic" family="Century Schoolbook" weight="700" style="italic" stretch="normal" glyphs="schlbkbi.ttf"/>
|
||||
<type name="Century-Schoolbook-Italic" fullname="Century Schoolbook Italic" family="Century Schoolbook" weight="400" style="italic" stretch="normal" glyphs="schlbki.ttf"/>
|
||||
<type name="Comic-Sans-MS" fullname="Comic Sans MS" family="Comic Sans MS" weight="400" style="normal" stretch="normal" glyphs="comic.ttf"/>
|
||||
<type name="Comic-Sans-MS-Bold" fullname="Comic Sans MS Bold" family="Comic Sans MS" weight="700" style="normal" stretch="normal" glyphs="comicbd.ttf"/>
|
||||
<type name="Courier-New" fullname="Courier New" family="Courier New" weight="400" style="normal" stretch="normal" glyphs="cour.ttf"/>
|
||||
<type name="Courier-New-Bold" fullname="Courier New Bold" family="Courier New" weight="700" style="normal" stretch="normal" glyphs="courbd.ttf"/>
|
||||
<type name="Courier-New-Bold-Italic" fullname="Courier New Bold Italic" family="Courier New" weight="700" style="italic" stretch="normal" glyphs="courbi.ttf"/>
|
||||
<type name="Courier-New-Italic" fullname="Courier New Italic" family="Courier New" weight="400" style="italic" stretch="normal" glyphs="couri.ttf"/>
|
||||
<type name="Garamond" fullname="Garamond" family="Garamond" weight="400" style="normal" stretch="normal" glyphs="gara.ttf"/>
|
||||
<type name="Garamond-Bold" fullname="Garamond Bold" family="Garamond" weight="700" style="normal" stretch="normal" glyphs="garabd.ttf"/>
|
||||
<type name="Garamond-Italic" fullname="Garamond Italic" family="Garamond" weight="400" style="italic" stretch="normal" glyphs="Italic"/>
|
||||
<type name="Gill-Sans-MT-Ext-Condensed-Bold" fullname="Gill Sans MT Ext Condensed Bold" family="Gill Sans MT" weight="700" style="normal" stretch="extra-condensed" glyphs="glsnecb.ttf"/>
|
||||
<type name="Impact" fullname="Impact" family="Impact" weight="400" style="normal" stretch="normal" glyphs="impact.ttf"/>
|
||||
<type name="Lucida-Blackletter" fullname="Lucida Blackletter" family="Lucida Blackletter" weight="400" style="normal" stretch="normal" glyphs="lblack.ttf"/>
|
||||
<type name="Lucida-Bright" fullname="Lucida Bright" family="Lucida Bright" weight="400" style="normal" stretch="normal" glyphs="lbrite.ttf"/>
|
||||
<type name="Lucida-Bright-Demibold" fullname="Lucida Bright Demibold" family="Lucida Bright" weight="600" style="normal" stretch="normal" glyphs="lbrited.ttf"/>
|
||||
<type name="Lucida-Bright-Demibold-Italic" fullname="Lucida Bright Demibold Italic" family="Lucida Bright" weight="600" style="italic" stretch="normal" glyphs="lbritedi.ttf"/>
|
||||
<type name="Lucida-Bright-Italic" fullname="Lucida Bright Italic" family="Lucida Bright" weight="400" style="italic" stretch="normal" glyphs="lbritei.ttf"/>
|
||||
<type name="Lucida-Caligraphy-Italic" fullname="Lucida Caligraphy Italic" family="Lucida Caligraphy" weight="400" style="italic" stretch="normal" glyphs="lcalig.ttf"/>
|
||||
<type name="Lucida-Console, Lucida-Console" fullname="Lucida Console, Lucida Console" family="Regular" weight="400" style="lucon.ttf" stretch="normal" glyphs=""/>
|
||||
<type name="Lucida-Fax-Demibold" fullname="Lucida Fax Demibold" family="Lucida Fax" weight="600" style="normal" stretch="normal" glyphs="lfaxd.ttf"/>
|
||||
<type name="Lucida-Fax-Demibold-Italic" fullname="Lucida Fax Demibold Italic" family="Lucida Fax" weight="600" style="italic" stretch="normal" glyphs="lfaxdi.ttf"/>
|
||||
<type name="Lucida-Fax-Italic" fullname="Lucida Fax Italic" family="Lucida Fax" weight="400" style="italic" stretch="normal" glyphs="lfaxi.ttf"/>
|
||||
<type name="Lucida-Fax-Regular" fullname="Lucida Fax Regular" family="Lucida Fax" weight="400" style="normal" stretch="normal" glyphs="lfax.ttf"/>
|
||||
<type name="Lucida-Handwriting-Italic" fullname="Lucida Handwriting Italic" family="Lucida Handwriting" weight="400" style="italic" stretch="normal" glyphs="lhandw.ttf"/>
|
||||
<type name="Lucida-Sans-Demibold-Italic" fullname="Lucida Sans Demibold Italic" family="Lucida Sans" weight="600" style="italic" stretch="normal" glyphs="lsansdi.ttf"/>
|
||||
<type name="Lucida-Sans-Demibold-Roman" fullname="Lucida Sans Demibold Roman" family="Lucida Sans Demibold" weight="400" style="normal" stretch="normal" glyphs="lsansd.ttf"/>
|
||||
<type name="Lucida-Sans-Regular" fullname="Lucida Sans Regular" family="Lucida Sans" weight="400" style="normal" stretch="normal" glyphs="lsans.ttf"/>
|
||||
<type name="Lucida-Sans-Typewriter-Bold" fullname="Lucida Sans Typewriter Bold" family="Lucida Sans Typewriter" weight="700" style="normal" stretch="normal" glyphs="ltypeb.ttf"/>
|
||||
<type name="Lucida-Sans-Typewriter-Bold-Oblique" fullname="Lucida Sans Typewriter Bold Oblique" family="Lucida Sans Typewriter" weight="700" style="normal" stretch="normal" glyphs="ltypebo.ttf"/>
|
||||
<type name="Lucida-Sans-Typewriter-Oblique" fullname="Lucida Sans Typewriter Oblique" family="Lucida Sans Typewriter" weight="700" style="normal" stretch="normal" glyphs="ltypeo.ttf"/>
|
||||
<type name="Lucida-Sans-Typewriter-Regular" fullname="Lucida Sans Typewriter Regular" family="Lucida Sans Typewriter" weight="400" style="normal" stretch="normal" glyphs="ltype.ttf"/>
|
||||
<type name="MS-Sans-Serif" fullname="MS Sans Serif" family="MS Sans Serif" weight="400" style="normal" stretch="normal" glyphs="sseriff.ttf"/>
|
||||
<type name="MS-Serif" fullname="MS Serif" family="MS Serif" weight="400" style="normal" stretch="normal" glyphs="seriff.ttf"/>
|
||||
<type name="Modern" fullname="Modern" family="Modern" weight="400" style="normal" stretch="normal" glyphs="modern.ttf"/>
|
||||
<type name="Monotype-Corsiva" fullname="Monotype Corsiva" family="Monotype Corsiva" weight="400" style="normal" stretch="normal" glyphs="mtcorsva.ttf"/>
|
||||
<type name="Small-Fonts" fullname="Small Fonts" family="Small Fonts" weight="400" style="normal" stretch="normal" glyphs="smallf.ttf"/>
|
||||
<type name="Symbol" fullname="Symbol" family="Symbol" weight="400" style="normal" stretch="normal" glyphs="symbol.ttf" encoding="AppleRoman"/>
|
||||
<type name="Tahoma" fullname="Tahoma" family="Tahoma" weight="400" style="normal" stretch="normal" glyphs="tahoma.ttf"/>
|
||||
<type name="Tahoma-Bold" fullname="Tahoma Bold" family="Tahoma" weight="700" style="normal" stretch="normal" glyphs="tahomabd.ttf"/>
|
||||
<type name="Times-New-Roman" fullname="Times New Roman" family="Times New Roman" weight="400" style="normal" stretch="normal" glyphs="times.ttf"/>
|
||||
<type name="Times-New-Roman-Bold" fullname="Times New Roman Bold" family="Times New Roman" weight="700" style="normal" stretch="normal" glyphs="timesbd.ttf"/>
|
||||
<type name="Times-New-Roman-Bold-Italic" fullname="Times New Roman Bold Italic" family="Times New Roman" weight="700" style="italic" stretch="normal" glyphs="timesbi.ttf"/>
|
||||
<type name="Times-New-Roman-Italic" fullname="Times New Roman Italic" family="Times New Roman" weight="400" style="italic" stretch="normal" glyphs="timesi.ttf"/>
|
||||
<type name="Times-New-Roman-MT-Extra-Bold" fullname="Times New Roman MT Extra Bold" family="Times New Roman MT" weight="800" style="normal" stretch="normal" glyphs="timnreb.ttf"/>
|
||||
<type name="Verdana" fullname="Verdana" family="Verdana" weight="400" style="normal" stretch="normal" glyphs="verdana.ttf"/>
|
||||
<type name="Verdana-Bold" fullname="Verdana Bold" family="Verdana" weight="700" style="normal" stretch="normal" glyphs="verdanab.ttf"/>
|
||||
<type name="Verdana-Bold-Italic" fullname="Verdana Bold Italic" family="Verdana" weight="700" style="italic" stretch="normal" glyphs="verdanaz.ttf"/>
|
||||
<type name="Verdana-Italic" fullname="Verdana Italic" family="Verdana" weight="400" style="italic" stretch="normal" glyphs="verdanai.ttf"/>
|
||||
<type name="Wingdings" fullname="Wingdings" family="Wingdings" weight="400" style="normal" stretch="normal" glyphs="wingding.ttf" encoding="AppleRoman"/>
|
||||
<type name="Wingdings-2" fullname="Wingdings 2" family="Wingdings 2" weight="400" style="normal" stretch="normal" glyphs="wingdng2.ttf" encoding="AppleRoman"/>
|
||||
<type name="Wingdings-3" fullname="Wingdings 3" family="Wingdings 3" weight="400" style="normal" stretch="normal" glyphs="wingdng3.ttf" encoding="AppleRoman"/>
|
||||
</typemap>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE typemap [
|
||||
<!ELEMENT typemap (type)+>
|
||||
<!ELEMENT type (#PCDATA)>
|
||||
<!ELEMENT include (#PCDATA)>
|
||||
<!ATTLIST type name CDATA #REQUIRED>
|
||||
<!ATTLIST type fullname CDATA #IMPLIED>
|
||||
<!ATTLIST type family CDATA #IMPLIED>
|
||||
<!ATTLIST type foundry CDATA #IMPLIED>
|
||||
<!ATTLIST type weight CDATA #IMPLIED>
|
||||
<!ATTLIST type style CDATA #IMPLIED>
|
||||
<!ATTLIST type stretch CDATA #IMPLIED>
|
||||
<!ATTLIST type format CDATA #IMPLIED>
|
||||
<!ATTLIST type metrics CDATA #IMPLIED>
|
||||
<!ATTLIST type glyphs CDATA #REQUIRED>
|
||||
<!ATTLIST type version CDATA #IMPLIED>
|
||||
<!ATTLIST include file CDATA #REQUIRED>
|
||||
]>
|
||||
<typemap>
|
||||
<include file="type-apple.xml" />
|
||||
</typemap>
|
||||
@@ -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,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) const;
|
||||
|
||||
// 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_,
|
||||
const Allocator allocator_=NewAllocator);
|
||||
|
||||
private:
|
||||
BlobRef *_blobRef;
|
||||
};
|
||||
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_BlobRef_header
|
||||
@@ -1,88 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 2001, 2002
|
||||
// Copyright Dirk Lemstra 2013-2015
|
||||
//
|
||||
// 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 can read multi-threaded
|
||||
bool canReadMultithreaded(void) const;
|
||||
|
||||
// Format can write multi-threaded
|
||||
bool canWriteMultithreaded(void) const;
|
||||
|
||||
// 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;
|
||||
|
||||
// Name of the module
|
||||
std::string module(void) const;
|
||||
|
||||
// Format name
|
||||
std::string name(void) const;
|
||||
|
||||
// Unregisters this coder
|
||||
bool unregister(void) const;
|
||||
|
||||
private:
|
||||
bool _decoderThreadSupport;
|
||||
std::string _description;
|
||||
bool _encoderThreadSupport;
|
||||
bool _isMultiFrame;
|
||||
bool _isReadable;
|
||||
bool _isWritable;
|
||||
std::string _mimeType;
|
||||
std::string _module;
|
||||
std::string _name;
|
||||
};
|
||||
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_CoderInfo_header
|
||||
@@ -1,440 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003, 2008
|
||||
// Copyright Dirk Lemstra 2013-2014
|
||||
//
|
||||
// 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 RGBA components scaled to fit Quantum
|
||||
// All double arguments have a valid range of 0.0 - 1.0.
|
||||
class MagickPPExport Color
|
||||
{
|
||||
public:
|
||||
|
||||
// PixelType specifies the interpretation of PixelInfo members
|
||||
// CYMKPixel:
|
||||
// Cyan = red
|
||||
// Magenta = green
|
||||
// Yellow = blue
|
||||
// Black(K) = black
|
||||
// CYMKPixel:
|
||||
// Cyan = red
|
||||
// Magenta = green
|
||||
// Yellow = blue
|
||||
// Black(K) = black
|
||||
// Alpha = alpha
|
||||
// RGBPixel:
|
||||
// Red = red;
|
||||
// Green = green;
|
||||
// Blue = blue;
|
||||
// RGBAPixel:
|
||||
// Red = red;
|
||||
// Green = green;
|
||||
// Blue = blue;
|
||||
// Alpha = alpha;
|
||||
enum PixelType
|
||||
{
|
||||
CMYKPixel,
|
||||
CMYKAPixel,
|
||||
RGBPixel,
|
||||
RGBAPixel
|
||||
};
|
||||
|
||||
// Default constructor
|
||||
Color(void);
|
||||
|
||||
// Construct Color using the specified RGB values
|
||||
Color(const Quantum red_,const Quantum green_,const Quantum blue_);
|
||||
|
||||
// Construct Color using the specified RGBA values
|
||||
Color(const Quantum red_,const Quantum green_,const Quantum blue_,
|
||||
const Quantum alpha_);
|
||||
|
||||
// Construct Color using the specified CMYKA values
|
||||
Color(const Quantum cyan_,const Quantum magenta_,const Quantum yellow_,
|
||||
const Quantum black_,const Quantum alpha_);
|
||||
|
||||
// Construct Color using the specified color string
|
||||
Color(const char *color_);
|
||||
|
||||
// Copy constructor
|
||||
Color(const Color &color_);
|
||||
|
||||
// Construct color via ImageMagick PixelInfo
|
||||
Color(const PixelInfo &color_);
|
||||
|
||||
// Constructor Color using the specified color string
|
||||
Color(const std::string &color_);
|
||||
|
||||
// Destructor
|
||||
virtual ~Color(void);
|
||||
|
||||
// Assignment operator
|
||||
Color& operator=(const Color &color_);
|
||||
|
||||
// Set color via X11 color specification string
|
||||
const Color& operator=(const char *color);
|
||||
|
||||
// Set color via ImageMagick PixelInfo
|
||||
const Color& operator=(const PixelInfo &color_);
|
||||
|
||||
// Set color via color specification string
|
||||
const Color& operator=(const std::string &color);
|
||||
|
||||
// Return ImageMagick PixelInfo
|
||||
operator PixelInfo() const;
|
||||
|
||||
// Return color specification string
|
||||
operator std::string() const;
|
||||
|
||||
// Returns true if the distance between the other color is less than the
|
||||
// specified distance in a linear three(or four) % dimensional color space.
|
||||
bool isFuzzyEquivalent(const Color &color_,const double fuzz_) const;
|
||||
|
||||
// Does object contain valid color?
|
||||
void isValid(const bool valid_);
|
||||
bool isValid(void) const;
|
||||
|
||||
// Returns pixel type of the color
|
||||
Magick::Color::PixelType pixelType(void) const;
|
||||
|
||||
// Alpha level (range OpaqueAlpha=0 to TransparentAlpha=QuantumRange)
|
||||
void quantumAlpha(const Quantum alpha_);
|
||||
Quantum quantumAlpha(void) const;
|
||||
|
||||
// Black color (range 0 to QuantumRange)
|
||||
void quantumBlack(const Quantum black_);
|
||||
Quantum quantumBlack(void) const;
|
||||
|
||||
// Blue/Yellow color (range 0 to QuantumRange)
|
||||
void quantumBlue(const Quantum blue_);
|
||||
Quantum quantumBlue(void) const;
|
||||
|
||||
// Green/Magenta color (range 0 to QuantumRange)
|
||||
void quantumGreen(const Quantum green_);
|
||||
Quantum quantumGreen(void) const;
|
||||
|
||||
// Red/Cyan color (range 0 to QuantumRange)
|
||||
void quantumRed(const Quantum red_);
|
||||
Quantum quantumRed(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
// Used to point Color at a pixel in an image
|
||||
Color(PixelInfo *rep_,PixelType pixelType_);
|
||||
|
||||
// Constructor to construct with PixelType
|
||||
Color(PixelType pixelType_);
|
||||
|
||||
// Set pixel
|
||||
// Used to point Color at a pixel in an image
|
||||
void pixel(PixelInfo *rep_,PixelType pixelType_);
|
||||
|
||||
// Scale a value expressed as a double (0-1) to Quantum range (0-QuantumRange)
|
||||
static Quantum scaleDoubleToQuantum(const double double_);
|
||||
|
||||
// Scale a value expressed as a Quantum (0-QuantumRange) to double range (0-1)
|
||||
static double scaleQuantumToDouble(const Quantum quantum_);
|
||||
|
||||
// PixelInfo represents a color pixel:
|
||||
// red = red (range 0 to QuantumRange)
|
||||
// green = green (range 0 to QuantumRange)
|
||||
// blue = blue (range 0 to QuantumRange)
|
||||
// alpha = alpha (range OpaqueAlpha=0 to TransparentAlpha=QuantumRange)
|
||||
// index = PseudoColor colormap index
|
||||
PixelInfo *_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 PixelInfo representation
|
||||
void initPixel();
|
||||
|
||||
// Sets the pixel type using the specified PixelInfo.
|
||||
void setPixelType(const PixelInfo &color_);
|
||||
};
|
||||
|
||||
class MagickPPExport ColorCMYK: public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorCMYK(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorCMYK(const Color &color_);
|
||||
|
||||
// Construct ColorCMYK using the specified CMYK values
|
||||
ColorCMYK(const double cyan_,const double magenta_,const double yellow_,
|
||||
const double black_);
|
||||
|
||||
// Construct ColorCMYK using the specified CMYKA values
|
||||
ColorCMYK(const double cyan_,const double magenta_,const double yellow_,
|
||||
const double black_,const double alpha_);
|
||||
|
||||
// Destructor
|
||||
~ColorCMYK(void);
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorCMYK& operator=(const Color& color_);
|
||||
|
||||
// Alpha level (range 0 to 1.0)
|
||||
void alpha(const double alpha_);
|
||||
double alpha(void) const;
|
||||
|
||||
// Black/Key color (range 0 to 1.0)
|
||||
void black(const double black_);
|
||||
double black(void) const;
|
||||
|
||||
// Black/Key color (range 0.0 to 1.0)
|
||||
void cyan(const double cyan_);
|
||||
double cyan(void) const;
|
||||
|
||||
// Magenta color (range 0 to 1.0)
|
||||
void magenta(const double magenta_);
|
||||
double magenta(void) const;
|
||||
|
||||
// Yellow color (range 0 to 1.0)
|
||||
void yellow(const double yellow_);
|
||||
double yellow(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorCMYK(PixelInfo *rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
//
|
||||
// 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(const double shade_);
|
||||
|
||||
// Destructor
|
||||
~ColorGray();
|
||||
|
||||
// Shade
|
||||
void shade(const double shade_);
|
||||
double shade(void) const;
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorGray& operator=(const Color& color_);
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorGray(PixelInfo *rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
//
|
||||
// HSL Colorspace colors
|
||||
//
|
||||
// All double arguments have a valid range of 0.0 - 1.0.
|
||||
class MagickPPExport ColorHSL: public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorHSL(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorHSL(const Color &color_);
|
||||
|
||||
// Construct ColorHSL using the specified HSL values
|
||||
ColorHSL(const double hue_,const double saturation_,
|
||||
const double lightness_);
|
||||
|
||||
// Destructor
|
||||
~ColorHSL();
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorHSL& operator=(const Color& color_);
|
||||
|
||||
// Hue color
|
||||
void hue(const double hue_);
|
||||
double hue(void) const;
|
||||
|
||||
// Lightness color
|
||||
void lightness(const double lightness_);
|
||||
double lightness(void) const;
|
||||
|
||||
// Saturation color
|
||||
void saturation(const double saturation_);
|
||||
double saturation(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorHSL(PixelInfo *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(const bool mono_);
|
||||
|
||||
// Copy constructor
|
||||
ColorMono(const Color &color_);
|
||||
|
||||
// Destructor
|
||||
~ColorMono();
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorMono& operator=(const Color& color_);
|
||||
|
||||
// Mono color
|
||||
void mono(const bool mono_);
|
||||
bool mono(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorMono(PixelInfo* rep_,PixelType pixelType_);
|
||||
};
|
||||
|
||||
class MagickPPExport ColorRGB: public Color
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ColorRGB(void);
|
||||
|
||||
// Copy constructor
|
||||
ColorRGB(const Color &color_);
|
||||
|
||||
// Construct ColorRGB using the specified RGB values
|
||||
ColorRGB(const double red_,const double green_,const double blue_);
|
||||
|
||||
// Construct ColorRGB using the specified RGBA values
|
||||
ColorRGB(const double red_,const double green_,const double blue_,
|
||||
const double alpha_);
|
||||
|
||||
// Destructor
|
||||
~ColorRGB(void);
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorRGB& operator=(const Color& color_);
|
||||
|
||||
// Alpha level (range 0 to 1.0)
|
||||
void alpha(const double alpha_);
|
||||
double alpha(void) const;
|
||||
|
||||
// Blue color (range 0.0 to 1.0)
|
||||
void blue(const double blue_);
|
||||
double blue(void) const;
|
||||
|
||||
// Green color (range 0 to 1.0)
|
||||
void green(const double green_);
|
||||
double green(void) const;
|
||||
|
||||
// Red color (range 0 to 1.0)
|
||||
void red(const double red_);
|
||||
double red(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorRGB(PixelInfo *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(const double y_,const double u_,const double v_);
|
||||
|
||||
// Destructor
|
||||
~ColorYUV(void);
|
||||
|
||||
// Assignment operator from base class
|
||||
ColorYUV& operator=(const Color& color_);
|
||||
|
||||
// Color U (0.0 through 1.0)
|
||||
void u(const double u_);
|
||||
double u(void) const;
|
||||
|
||||
// Color V (-0.5 through 0.5)
|
||||
void v(const double v_);
|
||||
double v(void) const;
|
||||
|
||||
// Color Y (-0.5 through 0.5)
|
||||
void y(const double y_);
|
||||
double y(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Constructor to construct with PixelInfo*
|
||||
ColorYUV(PixelInfo *rep_,PixelType pixelType_);
|
||||
|
||||
private:
|
||||
|
||||
void convert(const double y_,const double u_,const double v_);
|
||||
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_Color_header
|
||||
@@ -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(void);
|
||||
|
||||
// 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,261 +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);
|
||||
|
||||
// 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;
|
||||
|
||||
// X offset from origin
|
||||
void xOff(::ssize_t xOff_);
|
||||
::ssize_t xOff(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 _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;
|
||||
};
|
||||
|
||||
class MagickPPExport Point;
|
||||
|
||||
// Compare two Point objects
|
||||
MagickPPExport int operator ==
|
||||
(const Magick::Point& left_,const Magick::Point& right_);
|
||||
MagickPPExport int operator !=
|
||||
(const Magick::Point& left_,const Magick::Point& right_);
|
||||
|
||||
class MagickPPExport Point
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
Point();
|
||||
|
||||
// Construct Point from specified string
|
||||
Point(const char *point_);
|
||||
|
||||
// Copy constructor
|
||||
Point(const Point &point_);
|
||||
|
||||
// Construct Point from specified string
|
||||
Point(const std::string &point_);
|
||||
|
||||
// Construct Point from specified x and y
|
||||
Point(double x_,double y_);
|
||||
|
||||
// Construct Point from specified x y
|
||||
Point(double xy_);
|
||||
|
||||
// Destructor
|
||||
~Point(void);
|
||||
|
||||
// Set via point string
|
||||
const Point& operator=(const char *point_);
|
||||
|
||||
// Set via double value
|
||||
const Point& operator=(double xy_);
|
||||
|
||||
// Assignment operator
|
||||
Point& operator=(const Point& point_);
|
||||
|
||||
// Set via point string
|
||||
const Point& operator=(const std::string &point_);
|
||||
|
||||
// Return point string
|
||||
operator std::string() const;
|
||||
|
||||
// Does object contain valid point?
|
||||
bool isValid() const;
|
||||
|
||||
// X offset from origin
|
||||
double x(void) const;
|
||||
|
||||
// Y offset from origin
|
||||
double y(void) const;
|
||||
|
||||
private:
|
||||
double _x;
|
||||
double _y;
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_Geometry_header
|
||||
@@ -1,155 +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;
|
||||
|
||||
// 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;
|
||||
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 foreground color
|
||||
void matteColor(const Color &matteColor_);
|
||||
Color matteColor(void) const;
|
||||
|
||||
// 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;
|
||||
|
||||
//
|
||||
// Implementation methods/members
|
||||
//
|
||||
|
||||
// Update elements in existing MontageInfo structure
|
||||
void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const;
|
||||
|
||||
private:
|
||||
|
||||
Color _matteColor;
|
||||
Color _borderColor;
|
||||
size_t _borderWidth;
|
||||
Geometry _frame;
|
||||
};
|
||||
} // namespace Magick
|
||||
|
||||
#endif // Magick_Montage_header
|
||||
@@ -1,152 +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.
|
||||
Quantum *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 Quantum *getConst(const ::ssize_t x_,const ::ssize_t y_,
|
||||
const size_t columns_,const size_t rows_);
|
||||
|
||||
// Return pixel metacontent
|
||||
void *metacontent(void);
|
||||
|
||||
// Returns the offset for the specified channel.
|
||||
ssize_t offset(PixelChannel channel) const;
|
||||
|
||||
// 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.
|
||||
Quantum *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);
|
||||
|
||||
// Left ordinate of view
|
||||
::ssize_t x(void) const;
|
||||
|
||||
// Top ordinate of view
|
||||
::ssize_t y(void) const;
|
||||
|
||||
// Width of view
|
||||
size_t columns(void) const;
|
||||
|
||||
// Height of view
|
||||
size_t rows(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,72 +0,0 @@
|
||||
// This may look like C code, but it is really -*- C++ -*-
|
||||
//
|
||||
// Copyright Dirk Lemstra 2014
|
||||
//
|
||||
// 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);
|
||||
|
||||
// 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
|
||||
@@ -1,307 +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);
|
||||
|
||||
// X position of centroid
|
||||
double centroidX(void) const;
|
||||
|
||||
// Y position of centroid
|
||||
double centroidY(void) const;
|
||||
|
||||
// The channel
|
||||
PixelChannel 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;
|
||||
|
||||
// Does object contain valid channel moments?
|
||||
bool isValid() const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
|
||||
ChannelMoments(const PixelChannel channel_,
|
||||
const MagickCore::ChannelMoments *channelMoments_);
|
||||
|
||||
private:
|
||||
PixelChannel _channel;
|
||||
std::vector<double> _huInvariants;
|
||||
double _centroidX;
|
||||
double _centroidY;
|
||||
double _ellipseAxisX;
|
||||
double _ellipseAxisY;
|
||||
double _ellipseAngle;
|
||||
double _ellipseEccentricity;
|
||||
double _ellipseIntensity;
|
||||
};
|
||||
|
||||
class MagickPPExport ChannelPerceptualHash
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ChannelPerceptualHash(void);
|
||||
|
||||
// Copy constructor
|
||||
ChannelPerceptualHash(const ChannelPerceptualHash &channelPerceptualHash_);
|
||||
|
||||
// Constructor using the specified hash string
|
||||
ChannelPerceptualHash(const PixelChannel channel_,
|
||||
const std::string &hash_);
|
||||
|
||||
// Destroy channel perceptual hash
|
||||
~ChannelPerceptualHash(void);
|
||||
|
||||
// Return hash string
|
||||
operator std::string() const;
|
||||
|
||||
// The channel
|
||||
PixelChannel channel(void) const;
|
||||
|
||||
// Does object contain valid channel perceptual hash?
|
||||
bool isValid() const;
|
||||
|
||||
// Returns the sum squared difference between this hash and the other hash
|
||||
double sumSquaredDifferences(
|
||||
const ChannelPerceptualHash &channelPerceptualHash_);
|
||||
|
||||
// SRGB hu preceptual hash (valid range for index is 0-6)
|
||||
double srgbHuPhash(const size_t index_) const;
|
||||
|
||||
// HCLp hu preceptual hash (valid range for index is 0-6)
|
||||
double hclpHuPhash(const size_t index_) const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
|
||||
ChannelPerceptualHash(const PixelChannel channel_,
|
||||
const MagickCore::ChannelPerceptualHash *channelPerceptualHash_);
|
||||
|
||||
private:
|
||||
PixelChannel _channel;
|
||||
std::vector<double> _srgbHuPhash;
|
||||
std::vector<double> _hclpHuPhash;
|
||||
};
|
||||
|
||||
// Obtain image statistics. Statistics are normalized to the range
|
||||
// of 0.0 to 1.0 and are output to the specified ImageStatistics
|
||||
// structure.
|
||||
class MagickPPExport ChannelStatistics
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ChannelStatistics(void);
|
||||
|
||||
// Copy constructor
|
||||
ChannelStatistics(const ChannelStatistics &channelStatistics_);
|
||||
|
||||
// Destroy channel statistics
|
||||
~ChannelStatistics(void);
|
||||
|
||||
// Area
|
||||
double area() const;
|
||||
|
||||
// The channel
|
||||
PixelChannel channel(void) const;
|
||||
|
||||
// Depth
|
||||
size_t depth() const;
|
||||
|
||||
// Entropy
|
||||
double entropy() const;
|
||||
|
||||
// Does object contain valid channel statistics?
|
||||
bool isValid() const;
|
||||
|
||||
// Kurtosis
|
||||
double kurtosis() const;
|
||||
|
||||
// Minimum value observed
|
||||
double maxima() const;
|
||||
|
||||
// Average (mean) value observed
|
||||
double mean() const;
|
||||
|
||||
// Maximum value observed
|
||||
double minima() const;
|
||||
|
||||
// Skewness
|
||||
double skewness() const;
|
||||
|
||||
// Standard deviation, sqrt(variance)
|
||||
double standardDeviation() const;
|
||||
|
||||
// Sum
|
||||
double sum() const;
|
||||
|
||||
// Sum cubed
|
||||
double sumCubed() const;
|
||||
|
||||
// Sum fourth power
|
||||
double sumFourthPower() const;
|
||||
|
||||
// Sum squared
|
||||
double sumSquared() const;
|
||||
|
||||
// Variance
|
||||
double variance() const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
|
||||
ChannelStatistics(const PixelChannel channel_,
|
||||
const MagickCore::ChannelStatistics *channelStatistics_);
|
||||
|
||||
private:
|
||||
PixelChannel _channel;
|
||||
double _area;
|
||||
size_t _depth;
|
||||
double _entropy;
|
||||
double _kurtosis;
|
||||
double _maxima;
|
||||
double _mean;
|
||||
double _minima;
|
||||
double _skewness;
|
||||
double _standardDeviation;
|
||||
double _sum;
|
||||
double _sumCubed;
|
||||
double _sumFourthPower;
|
||||
double _sumSquared;
|
||||
double _variance;
|
||||
};
|
||||
|
||||
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 PixelChannel channel_) const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
ImageMoments(const Image &image_);
|
||||
|
||||
private:
|
||||
std::vector<ChannelMoments> _channels;
|
||||
};
|
||||
|
||||
class MagickPPExport ImagePerceptualHash
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ImagePerceptualHash(void);
|
||||
|
||||
// Copy constructor
|
||||
ImagePerceptualHash(const ImagePerceptualHash &imagePerceptualHash_);
|
||||
|
||||
// Constructor using the specified hash string
|
||||
ImagePerceptualHash(const std::string &hash_);
|
||||
|
||||
// Destroy image perceptual hash
|
||||
~ImagePerceptualHash(void);
|
||||
|
||||
// Return hash string
|
||||
operator std::string() const;
|
||||
|
||||
// Returns the perceptual hash for the specified channel
|
||||
ChannelPerceptualHash channel(const PixelChannel channel_) const;
|
||||
|
||||
// Does object contain valid perceptual hash?
|
||||
bool isValid() const;
|
||||
|
||||
// Returns the sum squared difference between this hash and the other hash
|
||||
double sumSquaredDifferences(
|
||||
const ImagePerceptualHash &channelPerceptualHash_);
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
ImagePerceptualHash(const Image &image_);
|
||||
|
||||
private:
|
||||
std::vector<ChannelPerceptualHash> _channels;
|
||||
};
|
||||
|
||||
class MagickPPExport ImageStatistics
|
||||
{
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
ImageStatistics(void);
|
||||
|
||||
// Copy constructor
|
||||
ImageStatistics(const ImageStatistics &imageStatistics_);
|
||||
|
||||
// Destroy image statistics
|
||||
~ImageStatistics(void);
|
||||
|
||||
// Returns the statistics for the specified channel
|
||||
ChannelStatistics channel(const PixelChannel channel_) const;
|
||||
|
||||
//
|
||||
// Implemementation methods
|
||||
//
|
||||
ImageStatistics(const Image &image_);
|
||||
|
||||
private:
|
||||
std::vector<ChannelStatistics> _channels;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // Magick_ChannelMoments_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,171 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore Application Programming Interface declarations.
|
||||
*/
|
||||
|
||||
#ifndef MAGICKCORE_CORE_H
|
||||
#define MAGICKCORE_CORE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(MAGICKCORE_CONFIG_H)
|
||||
# define MAGICKCORE_CONFIG_H
|
||||
# if !defined(vms) && !defined(macintosh)
|
||||
# include "MagickCore/magick-config.h"
|
||||
# else
|
||||
# include "magick-config.h"
|
||||
# endif
|
||||
#if defined(_magickcore_const) && !defined(const)
|
||||
# define const _magickcore_const
|
||||
#endif
|
||||
#if defined(_magickcore_inline) && !defined(inline)
|
||||
# define inline _magickcore_inline
|
||||
#endif
|
||||
#if !defined(magick_restrict)
|
||||
# if !defined(_magickcore_restrict)
|
||||
# define magick_restrict restrict
|
||||
# else
|
||||
# define magick_restrict _magickcore_restrict
|
||||
# endif
|
||||
#endif
|
||||
# if defined(__cplusplus) || defined(c_plusplus)
|
||||
# undef inline
|
||||
# endif
|
||||
#endif
|
||||
#if __cplusplus > 199711L
|
||||
#define register
|
||||
#endif
|
||||
|
||||
#define MAGICKCORE_CHECK_VERSION(major,minor,micro) \
|
||||
((MAGICKCORE_MAJOR_VERSION > (major)) || \
|
||||
((MAGICKCORE_MAJOR_VERSION == (major)) && \
|
||||
(MAGICKCORE_MINOR_VERSION > (minor))) || \
|
||||
((MAGICKCORE_MAJOR_VERSION == (major)) && \
|
||||
(MAGICKCORE_MINOR_VERSION == (minor)) && \
|
||||
(MAGICKCORE_MICRO_VERSION >= (micro))))
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
# define MAGICKCORE_WINDOWS_SUPPORT
|
||||
#else
|
||||
# define MAGICKCORE_POSIX_SUPPORT
|
||||
#endif
|
||||
|
||||
#include "MagickCore/method-attribute.h"
|
||||
|
||||
#if defined(MAGICKCORE_NAMESPACE_PREFIX)
|
||||
# include "MagickCore/methods.h"
|
||||
#endif
|
||||
#include "MagickCore/magick-type.h"
|
||||
#include "MagickCore/animate.h"
|
||||
#include "MagickCore/annotate.h"
|
||||
#include "MagickCore/artifact.h"
|
||||
#include "MagickCore/attribute.h"
|
||||
#include "MagickCore/blob.h"
|
||||
#include "MagickCore/cache.h"
|
||||
#include "MagickCore/cache-view.h"
|
||||
#include "MagickCore/channel.h"
|
||||
#include "MagickCore/cipher.h"
|
||||
#include "MagickCore/client.h"
|
||||
#include "MagickCore/coder.h"
|
||||
#include "MagickCore/color.h"
|
||||
#include "MagickCore/colorspace.h"
|
||||
#include "MagickCore/colormap.h"
|
||||
#include "MagickCore/compare.h"
|
||||
#include "MagickCore/composite.h"
|
||||
#include "MagickCore/compress.h"
|
||||
#include "MagickCore/configure.h"
|
||||
#include "MagickCore/constitute.h"
|
||||
#include "MagickCore/decorate.h"
|
||||
#include "MagickCore/delegate.h"
|
||||
#include "MagickCore/deprecate.h"
|
||||
#include "MagickCore/display.h"
|
||||
#include "MagickCore/distort.h"
|
||||
#include "MagickCore/distribute-cache.h"
|
||||
#include "MagickCore/draw.h"
|
||||
#include "MagickCore/effect.h"
|
||||
#include "MagickCore/enhance.h"
|
||||
#include "MagickCore/exception.h"
|
||||
#include "MagickCore/feature.h"
|
||||
#include "MagickCore/fourier.h"
|
||||
#include "MagickCore/fx.h"
|
||||
#include "MagickCore/gem.h"
|
||||
#include "MagickCore/geometry.h"
|
||||
#include "MagickCore/histogram.h"
|
||||
#include "MagickCore/identify.h"
|
||||
#include "MagickCore/image.h"
|
||||
#include "MagickCore/image-view.h"
|
||||
#include "MagickCore/layer.h"
|
||||
#include "MagickCore/linked-list.h"
|
||||
#include "MagickCore/list.h"
|
||||
#include "MagickCore/locale_.h"
|
||||
#include "MagickCore/log.h"
|
||||
#include "MagickCore/magic.h"
|
||||
#include "MagickCore/magick.h"
|
||||
#include "MagickCore/matrix.h"
|
||||
#include "MagickCore/memory_.h"
|
||||
#include "MagickCore/module.h"
|
||||
#include "MagickCore/mime.h"
|
||||
#include "MagickCore/monitor.h"
|
||||
#include "MagickCore/montage.h"
|
||||
#include "MagickCore/morphology.h"
|
||||
#include "MagickCore/opencl.h"
|
||||
#include "MagickCore/option.h"
|
||||
#include "MagickCore/paint.h"
|
||||
#include "MagickCore/pixel.h"
|
||||
#include "MagickCore/pixel-accessor.h"
|
||||
#include "MagickCore/policy.h"
|
||||
#include "MagickCore/prepress.h"
|
||||
#include "MagickCore/profile.h"
|
||||
#include "MagickCore/property.h"
|
||||
#include "MagickCore/quantize.h"
|
||||
#include "MagickCore/quantum.h"
|
||||
#include "MagickCore/registry.h"
|
||||
#include "MagickCore/random_.h"
|
||||
#include "MagickCore/resample.h"
|
||||
#include "MagickCore/resize.h"
|
||||
#include "MagickCore/resource_.h"
|
||||
#include "MagickCore/segment.h"
|
||||
#include "MagickCore/shear.h"
|
||||
#include "MagickCore/signature.h"
|
||||
#include "MagickCore/splay-tree.h"
|
||||
#include "MagickCore/stream.h"
|
||||
#include "MagickCore/statistic.h"
|
||||
#include "MagickCore/string_.h"
|
||||
#include "MagickCore/timer.h"
|
||||
#include "MagickCore/token.h"
|
||||
#include "MagickCore/transform.h"
|
||||
#include "MagickCore/threshold.h"
|
||||
#include "MagickCore/type.h"
|
||||
#include "MagickCore/utility.h"
|
||||
#include "MagickCore/version.h"
|
||||
#include "MagickCore/vision.h"
|
||||
#include "MagickCore/xml-tree.h"
|
||||
#include "MagickCore/xwindow.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore methods to interactively animate an image sequence.
|
||||
*/
|
||||
#ifndef MAGICKCORE_ANIMATE_H
|
||||
#define MAGICKCORE_ANIMATE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
AnimateImages(const ImageInfo *,Image *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image annotation methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_ANNOTATE_H
|
||||
#define MAGICKCORE_ANNOTATE_H
|
||||
|
||||
#include "MagickCore/draw.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
AnnotateImage(Image *,const DrawInfo *,ExceptionInfo *),
|
||||
GetMultilineTypeMetrics(Image *,const DrawInfo *,TypeMetric *,
|
||||
ExceptionInfo *),
|
||||
GetTypeMetrics(Image *,const DrawInfo *,TypeMetric *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport ssize_t
|
||||
FormatMagickCaption(Image *,DrawInfo *,const MagickBooleanType,TypeMetric *,
|
||||
char **,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore artifact methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_ARTIFACT_H
|
||||
#define MAGICKCORE_ARTIFACT_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport char
|
||||
*RemoveImageArtifact(Image *,const char *);
|
||||
|
||||
extern MagickExport const char
|
||||
*GetNextImageArtifact(const Image *),
|
||||
*GetImageArtifact(const Image *,const char *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
CloneImageArtifacts(Image *,const Image *),
|
||||
DefineImageArtifact(Image *,const char *),
|
||||
DeleteImageArtifact(Image *,const char *),
|
||||
SetImageArtifact(Image *,const char *,const char *);
|
||||
|
||||
extern MagickExport void
|
||||
DestroyImageArtifacts(Image *),
|
||||
ResetImageArtifactIterator(const Image *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore methods to set or get image attributes.
|
||||
*/
|
||||
#ifndef MAGICKCORE_ATTRIBUTE_H
|
||||
#define MAGICKCORE_ATTRIBUTE_H
|
||||
|
||||
#include "MagickCore/image.h"
|
||||
#include "MagickCore/exception.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport ImageType
|
||||
GetImageType(const Image *),
|
||||
IdentifyImageGray(const Image *,ExceptionInfo *),
|
||||
IdentifyImageType(const Image *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
IdentifyImageMonochrome(const Image *,ExceptionInfo *),
|
||||
IsImageGray(const Image *),
|
||||
IsImageMonochrome(const Image *),
|
||||
IsImageOpaque(const Image *,ExceptionInfo *),
|
||||
SetImageDepth(Image *,const size_t,ExceptionInfo *),
|
||||
SetImageType(Image *,const ImageType,ExceptionInfo *);
|
||||
|
||||
extern MagickExport RectangleInfo
|
||||
GetImageBoundingBox(const Image *,ExceptionInfo *exception);
|
||||
|
||||
extern MagickExport size_t
|
||||
GetImageDepth(const Image *,ExceptionInfo *),
|
||||
GetImageQuantumDepth(const Image *,const MagickBooleanType);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore Binary Large OBjects methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_BLOB_H
|
||||
#define MAGICKCORE_BLOB_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MagickMaxBufferExtent 81920
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ReadMode,
|
||||
WriteMode,
|
||||
IOMode
|
||||
} MapMode;
|
||||
|
||||
typedef ssize_t
|
||||
(*CustomStreamHandler)(const unsigned char *,const size_t,const void *);
|
||||
|
||||
typedef size_t
|
||||
(*CustomStreamSeeker)(const MagickOffsetType,const int,const void *);
|
||||
|
||||
typedef MagickOffsetType
|
||||
(*CustomStreamTeller)(const void *);
|
||||
|
||||
typedef struct _CustomStreamInfo
|
||||
CustomStreamInfo;
|
||||
|
||||
#include "MagickCore/image.h"
|
||||
#include "MagickCore/stream.h"
|
||||
|
||||
extern MagickExport CustomStreamInfo
|
||||
*AcquireCustomStreamInfo(ExceptionInfo *),
|
||||
*DestroyCustomStreamInfo(CustomStreamInfo *);
|
||||
|
||||
extern MagickExport FILE
|
||||
*GetBlobFileHandle(const Image *);
|
||||
|
||||
extern MagickExport Image
|
||||
*BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
|
||||
*PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
|
||||
*CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
|
||||
FileToImage(Image *,const char *,ExceptionInfo *),
|
||||
GetBlobError(const Image *),
|
||||
ImageToFile(Image *,char *,ExceptionInfo *),
|
||||
InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
|
||||
ExceptionInfo *),
|
||||
IsBlobExempt(const Image *),
|
||||
IsBlobSeekable(const Image *),
|
||||
IsBlobTemporary(const Image *);
|
||||
|
||||
extern MagickExport MagickSizeType
|
||||
GetBlobSize(const Image *);
|
||||
|
||||
extern MagickExport StreamHandler
|
||||
GetBlobStreamHandler(const Image *);
|
||||
|
||||
extern MagickExport void
|
||||
*GetBlobStreamData(const Image *),
|
||||
DestroyBlob(Image *),
|
||||
DuplicateBlob(Image *,const Image *),
|
||||
*FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
|
||||
*ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
|
||||
ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
|
||||
*ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
|
||||
ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
|
||||
SetBlobExempt(Image *,const MagickBooleanType),
|
||||
SetCustomStreamData(CustomStreamInfo *,void *),
|
||||
SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
|
||||
SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
|
||||
SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
|
||||
SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore cache view methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CACHE_VIEW_H
|
||||
#define MAGICKCORE_CACHE_VIEW_H
|
||||
|
||||
#include "MagickCore/pixel.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedVirtualPixelMethod,
|
||||
BackgroundVirtualPixelMethod,
|
||||
DitherVirtualPixelMethod,
|
||||
EdgeVirtualPixelMethod,
|
||||
MirrorVirtualPixelMethod,
|
||||
RandomVirtualPixelMethod,
|
||||
TileVirtualPixelMethod,
|
||||
TransparentVirtualPixelMethod,
|
||||
MaskVirtualPixelMethod,
|
||||
BlackVirtualPixelMethod,
|
||||
GrayVirtualPixelMethod,
|
||||
WhiteVirtualPixelMethod,
|
||||
HorizontalTileVirtualPixelMethod,
|
||||
VerticalTileVirtualPixelMethod,
|
||||
HorizontalTileEdgeVirtualPixelMethod,
|
||||
VerticalTileEdgeVirtualPixelMethod,
|
||||
CheckerTileVirtualPixelMethod
|
||||
} VirtualPixelMethod;
|
||||
|
||||
typedef struct _CacheView
|
||||
CacheView;
|
||||
|
||||
extern MagickExport CacheView
|
||||
*AcquireAuthenticCacheView(const Image *,ExceptionInfo *),
|
||||
*AcquireVirtualCacheView(const Image *,ExceptionInfo *),
|
||||
*CloneCacheView(const CacheView *),
|
||||
*DestroyCacheView(CacheView *);
|
||||
|
||||
extern MagickExport ClassType
|
||||
GetCacheViewStorageClass(const CacheView *);
|
||||
|
||||
extern MagickExport ColorspaceType
|
||||
GetCacheViewColorspace(const CacheView *);
|
||||
|
||||
extern MagickExport const Image
|
||||
*GetCacheViewImage(const CacheView *);
|
||||
|
||||
extern MagickExport const Quantum
|
||||
*GetCacheViewVirtualPixels(const CacheView *,const ssize_t,const ssize_t,
|
||||
const size_t,const size_t,ExceptionInfo *) magick_hot_spot,
|
||||
*GetCacheViewVirtualPixelQueue(const CacheView *) magick_hot_spot;
|
||||
|
||||
extern MagickExport const void
|
||||
*GetCacheViewVirtualMetacontent(const CacheView *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
GetOneCacheViewAuthenticPixel(const CacheView *,const ssize_t,const ssize_t,
|
||||
Quantum *,ExceptionInfo *),
|
||||
GetOneCacheViewVirtualMethodPixel(const CacheView *,const VirtualPixelMethod,
|
||||
const ssize_t,const ssize_t,Quantum *,ExceptionInfo *),
|
||||
GetOneCacheViewVirtualPixel(const CacheView *,const ssize_t,const ssize_t,
|
||||
Quantum *,ExceptionInfo *),
|
||||
GetOneCacheViewVirtualPixelInfo(const CacheView *,const ssize_t,const ssize_t,
|
||||
PixelInfo *,ExceptionInfo *),
|
||||
SetCacheViewStorageClass(CacheView *,const ClassType,ExceptionInfo *),
|
||||
SetCacheViewVirtualPixelMethod(CacheView *magick_restrict,
|
||||
const VirtualPixelMethod),
|
||||
SyncCacheViewAuthenticPixels(CacheView *magick_restrict,ExceptionInfo *)
|
||||
magick_hot_spot;
|
||||
|
||||
extern MagickExport MagickSizeType
|
||||
GetCacheViewExtent(const CacheView *);
|
||||
|
||||
extern MagickExport Quantum
|
||||
*GetCacheViewAuthenticPixelQueue(CacheView *) magick_hot_spot,
|
||||
*GetCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t,
|
||||
const size_t,const size_t,ExceptionInfo *) magick_hot_spot,
|
||||
*QueueCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t,
|
||||
const size_t,const size_t,ExceptionInfo *) magick_hot_spot;
|
||||
|
||||
extern MagickExport void
|
||||
*GetCacheViewAuthenticMetacontent(CacheView *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore cache methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CACHE_H
|
||||
#define MAGICKCORE_CACHE_H
|
||||
|
||||
#include "MagickCore/blob.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedCache,
|
||||
DiskCache,
|
||||
DistributedCache,
|
||||
MapCache,
|
||||
MemoryCache,
|
||||
PingCache
|
||||
} CacheType;
|
||||
|
||||
extern MagickExport CacheType
|
||||
GetImagePixelCacheType(const Image *);
|
||||
|
||||
extern MagickExport const Quantum
|
||||
*GetVirtualPixels(const Image *,const ssize_t,const ssize_t,const size_t,
|
||||
const size_t,ExceptionInfo *) magick_hot_spot,
|
||||
*GetVirtualPixelQueue(const Image *) magick_hot_spot;
|
||||
|
||||
extern MagickExport const void
|
||||
*GetVirtualMetacontent(const Image *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
GetOneAuthenticPixel(Image *,const ssize_t,const ssize_t,Quantum *,
|
||||
ExceptionInfo *),
|
||||
GetOneVirtualPixel(const Image *,const ssize_t,const ssize_t,Quantum *,
|
||||
ExceptionInfo *),
|
||||
GetOneVirtualPixelInfo(const Image *,const VirtualPixelMethod,
|
||||
const ssize_t,const ssize_t,PixelInfo *,ExceptionInfo *),
|
||||
PersistPixelCache(Image *,const char *,const MagickBooleanType,
|
||||
MagickOffsetType *,ExceptionInfo *),
|
||||
SyncAuthenticPixels(Image *,ExceptionInfo *) magick_hot_spot;
|
||||
|
||||
extern MagickExport MagickSizeType
|
||||
GetImageExtent(const Image *);
|
||||
|
||||
extern MagickExport Quantum
|
||||
*GetAuthenticPixels(Image *,const ssize_t,const ssize_t,const size_t,
|
||||
const size_t,ExceptionInfo *) magick_hot_spot,
|
||||
*GetAuthenticPixelQueue(const Image *) magick_hot_spot,
|
||||
*QueueAuthenticPixels(Image *,const ssize_t,const ssize_t,const size_t,
|
||||
const size_t,ExceptionInfo *) magick_hot_spot;
|
||||
|
||||
extern MagickExport void
|
||||
*GetAuthenticMetacontent(const Image *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image channel methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CHANNEL_H
|
||||
#define MAGICKCORE_CHANNEL_H
|
||||
|
||||
#include <MagickCore/image.h>
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport Image
|
||||
*ChannelFxImage(const Image *,const char *,ExceptionInfo *),
|
||||
*CombineImages(const Image *,const ColorspaceType,ExceptionInfo *),
|
||||
*SeparateImage(const Image *,const ChannelType,ExceptionInfo *),
|
||||
*SeparateImages(const Image *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
GetImageAlphaChannel(const Image *),
|
||||
SetImageAlphaChannel(Image *,const AlphaChannelOption,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore cipher methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CIPHER_H
|
||||
#define MAGICKCORE_CIPHER_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
DecipherImage(Image *,const char *,ExceptionInfo *),
|
||||
EncipherImage(Image *,const char *,ExceptionInfo *),
|
||||
PasskeyDecipherImage(Image *,const StringInfo *,ExceptionInfo *),
|
||||
PasskeyEncipherImage(Image *,const StringInfo *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore client methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CLIENT_H
|
||||
#define MAGICKCORE_CLIENT_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport const char
|
||||
*GetClientPath(void),
|
||||
*GetClientName(void),
|
||||
*SetClientName(const char *),
|
||||
*SetClientPath(const char *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image coder methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CODER_H
|
||||
#define MAGICKCORE_CODER_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _CoderInfo
|
||||
{
|
||||
char
|
||||
*path,
|
||||
*magick,
|
||||
*name;
|
||||
|
||||
MagickBooleanType
|
||||
exempt,
|
||||
stealth;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
} CoderInfo;
|
||||
|
||||
extern MagickExport char
|
||||
**GetCoderList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport const CoderInfo
|
||||
*GetCoderInfo(const char *,ExceptionInfo *),
|
||||
**GetCoderInfoList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
ListCoderInfo(FILE *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image color methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_COLOR_H
|
||||
#define MAGICKCORE_COLOR_H
|
||||
|
||||
#include "MagickCore/pixel.h"
|
||||
#include "MagickCore/exception.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedCompliance,
|
||||
NoCompliance = 0x0000,
|
||||
CSSCompliance = 0x0001,
|
||||
SVGCompliance = 0x0001,
|
||||
X11Compliance = 0x0002,
|
||||
XPMCompliance = 0x0004,
|
||||
AllCompliance = 0x7fffffff
|
||||
} ComplianceType;
|
||||
|
||||
typedef struct _ColorInfo
|
||||
{
|
||||
char
|
||||
*path,
|
||||
*name;
|
||||
|
||||
ComplianceType
|
||||
compliance;
|
||||
|
||||
PixelInfo
|
||||
color;
|
||||
|
||||
MagickBooleanType
|
||||
exempt,
|
||||
stealth;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
} ColorInfo;
|
||||
|
||||
typedef struct _ErrorInfo
|
||||
{
|
||||
double
|
||||
mean_error_per_pixel,
|
||||
normalized_mean_error,
|
||||
normalized_maximum_error;
|
||||
} ErrorInfo;
|
||||
|
||||
extern MagickExport char
|
||||
**GetColorList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport const ColorInfo
|
||||
*GetColorInfo(const char *,ExceptionInfo *),
|
||||
**GetColorInfoList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y,
|
||||
ExceptionInfo *),
|
||||
ListColorInfo(FILE *,ExceptionInfo *),
|
||||
QueryColorCompliance(const char *,const ComplianceType,PixelInfo *,
|
||||
ExceptionInfo *),
|
||||
QueryColorname(const Image *,const PixelInfo *,const ComplianceType,
|
||||
char *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport void
|
||||
ConcatenateColorComponent(const PixelInfo *,const PixelChannel,
|
||||
const ComplianceType,char *),
|
||||
GetColorTuple(const PixelInfo *,const MagickBooleanType,char *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image colormap methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_COLORMAP_H
|
||||
#define MAGICKCORE_COLORMAP_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
AcquireImageColormap(Image *,const size_t,ExceptionInfo *),
|
||||
CycleColormapImage(Image *,const ssize_t,ExceptionInfo *),
|
||||
SortColormapByIntensity(Image *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image colorspace methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_COLORSPACE_H
|
||||
#define MAGICKCORE_COLORSPACE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedColorspace,
|
||||
CMYColorspace, /* negated linear RGB colorspace */
|
||||
CMYKColorspace, /* CMY with Black separation */
|
||||
GRAYColorspace, /* Single Channel greyscale (linear) image */
|
||||
HCLColorspace,
|
||||
HCLpColorspace,
|
||||
HSBColorspace,
|
||||
HSIColorspace,
|
||||
HSLColorspace,
|
||||
HSVColorspace, /* alias for HSB */
|
||||
HWBColorspace,
|
||||
LabColorspace,
|
||||
LCHColorspace, /* alias for LCHuv */
|
||||
LCHabColorspace, /* Cylindrical (Polar) Lab */
|
||||
LCHuvColorspace, /* Cylindrical (Polar) Luv */
|
||||
LogColorspace,
|
||||
LMSColorspace,
|
||||
LuvColorspace,
|
||||
OHTAColorspace,
|
||||
Rec601YCbCrColorspace,
|
||||
Rec709YCbCrColorspace,
|
||||
RGBColorspace, /* Linear RGB colorspace */
|
||||
scRGBColorspace, /* ??? */
|
||||
sRGBColorspace, /* Default: non-linear sRGB colorspace */
|
||||
TransparentColorspace,
|
||||
xyYColorspace,
|
||||
XYZColorspace, /* IEEE Color Reference colorspace */
|
||||
YCbCrColorspace,
|
||||
YCCColorspace,
|
||||
YDbDrColorspace,
|
||||
YIQColorspace,
|
||||
YPbPrColorspace,
|
||||
YUVColorspace
|
||||
} ColorspaceType;
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
SetImageColorspace(Image *,const ColorspaceType,ExceptionInfo *),
|
||||
SetImageGray(Image *,ExceptionInfo *),
|
||||
SetImageMonochrome(Image *,ExceptionInfo *),
|
||||
TransformImageColorspace(Image *,const ColorspaceType,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image compare methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_COMPARE_H
|
||||
#define MAGICKCORE_COMPARE_H
|
||||
|
||||
#include "MagickCore/image.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedErrorMetric,
|
||||
AbsoluteErrorMetric,
|
||||
FuzzErrorMetric,
|
||||
MeanAbsoluteErrorMetric,
|
||||
MeanErrorPerPixelErrorMetric,
|
||||
MeanSquaredErrorMetric,
|
||||
NormalizedCrossCorrelationErrorMetric,
|
||||
PeakAbsoluteErrorMetric,
|
||||
PeakSignalToNoiseRatioErrorMetric,
|
||||
PerceptualHashErrorMetric,
|
||||
RootMeanSquaredErrorMetric
|
||||
} MetricType;
|
||||
|
||||
extern MagickExport double
|
||||
*GetImageDistortions(Image *,const Image *,const MetricType,ExceptionInfo *);
|
||||
|
||||
extern MagickExport Image
|
||||
*CompareImages(Image *,const Image *,const MetricType,double *,
|
||||
ExceptionInfo *),
|
||||
*SimilarityImage(const Image *,const Image *,const MetricType,const double,
|
||||
RectangleInfo *,double *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
GetImageDistortion(Image *,const Image *,const MetricType,double *,
|
||||
ExceptionInfo *),
|
||||
IsImagesEqual(const Image *,const Image *,ExceptionInfo *),
|
||||
SetImageColorMetric(Image *,const Image *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image composite methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_COMPOSITE_H
|
||||
#define MAGICKCORE_COMPOSITE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedCompositeOp,
|
||||
AlphaCompositeOp,
|
||||
AtopCompositeOp,
|
||||
BlendCompositeOp,
|
||||
BlurCompositeOp,
|
||||
BumpmapCompositeOp,
|
||||
ChangeMaskCompositeOp,
|
||||
ClearCompositeOp,
|
||||
ColorBurnCompositeOp,
|
||||
ColorDodgeCompositeOp,
|
||||
ColorizeCompositeOp,
|
||||
CopyBlackCompositeOp,
|
||||
CopyBlueCompositeOp,
|
||||
CopyCompositeOp,
|
||||
CopyCyanCompositeOp,
|
||||
CopyGreenCompositeOp,
|
||||
CopyMagentaCompositeOp,
|
||||
CopyAlphaCompositeOp,
|
||||
CopyRedCompositeOp,
|
||||
CopyYellowCompositeOp,
|
||||
DarkenCompositeOp,
|
||||
DarkenIntensityCompositeOp,
|
||||
DifferenceCompositeOp,
|
||||
DisplaceCompositeOp,
|
||||
DissolveCompositeOp,
|
||||
DistortCompositeOp,
|
||||
DivideDstCompositeOp,
|
||||
DivideSrcCompositeOp,
|
||||
DstAtopCompositeOp,
|
||||
DstCompositeOp,
|
||||
DstInCompositeOp,
|
||||
DstOutCompositeOp,
|
||||
DstOverCompositeOp,
|
||||
ExclusionCompositeOp,
|
||||
HardLightCompositeOp,
|
||||
HardMixCompositeOp,
|
||||
HueCompositeOp,
|
||||
InCompositeOp,
|
||||
IntensityCompositeOp,
|
||||
LightenCompositeOp,
|
||||
LightenIntensityCompositeOp,
|
||||
LinearBurnCompositeOp,
|
||||
LinearDodgeCompositeOp,
|
||||
LinearLightCompositeOp,
|
||||
LuminizeCompositeOp,
|
||||
MathematicsCompositeOp,
|
||||
MinusDstCompositeOp,
|
||||
MinusSrcCompositeOp,
|
||||
ModulateCompositeOp,
|
||||
ModulusAddCompositeOp,
|
||||
ModulusSubtractCompositeOp,
|
||||
MultiplyCompositeOp,
|
||||
NoCompositeOp,
|
||||
OutCompositeOp,
|
||||
OverCompositeOp,
|
||||
OverlayCompositeOp,
|
||||
PegtopLightCompositeOp,
|
||||
PinLightCompositeOp,
|
||||
PlusCompositeOp,
|
||||
ReplaceCompositeOp,
|
||||
SaturateCompositeOp,
|
||||
ScreenCompositeOp,
|
||||
SoftLightCompositeOp,
|
||||
SrcAtopCompositeOp,
|
||||
SrcCompositeOp,
|
||||
SrcInCompositeOp,
|
||||
SrcOutCompositeOp,
|
||||
SrcOverCompositeOp,
|
||||
ThresholdCompositeOp,
|
||||
VividLightCompositeOp,
|
||||
XorCompositeOp
|
||||
} CompositeOperator;
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
CompositeImage(Image *,const Image *,const CompositeOperator,
|
||||
const MagickBooleanType,const ssize_t,const ssize_t,ExceptionInfo *),
|
||||
TextureImage(Image *,const Image *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image compression/decompression methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_COMPRESS_H
|
||||
#define MAGICKCORE_COMPRESS_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedCompression,
|
||||
B44ACompression,
|
||||
B44Compression,
|
||||
BZipCompression,
|
||||
DXT1Compression,
|
||||
DXT3Compression,
|
||||
DXT5Compression,
|
||||
FaxCompression,
|
||||
Group4Compression,
|
||||
JBIG1Compression, /* ISO/IEC std 11544 / ITU-T rec T.82 */
|
||||
JBIG2Compression, /* ISO/IEC std 14492 / ITU-T rec T.88 */
|
||||
JPEG2000Compression, /* ISO/IEC std 15444-1 */
|
||||
JPEGCompression,
|
||||
LosslessJPEGCompression,
|
||||
LZMACompression, /* Lempel-Ziv-Markov chain algorithm */
|
||||
LZWCompression,
|
||||
NoCompression,
|
||||
PizCompression,
|
||||
Pxr24Compression,
|
||||
RLECompression,
|
||||
ZipCompression,
|
||||
ZipSCompression
|
||||
} CompressionType;
|
||||
|
||||
typedef struct _Ascii85Info
|
||||
Ascii85Info;
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
HuffmanDecodeImage(Image *,ExceptionInfo *),
|
||||
HuffmanEncodeImage(const ImageInfo *,Image *,Image *,ExceptionInfo *),
|
||||
LZWEncodeImage(Image *,const size_t,unsigned char *magick_restrict,
|
||||
ExceptionInfo *),
|
||||
PackbitsEncodeImage(Image *,const size_t,unsigned char *magick_restrict,
|
||||
ExceptionInfo *),
|
||||
ZLIBEncodeImage(Image *,const size_t,unsigned char *magick_restrict,
|
||||
ExceptionInfo *);
|
||||
|
||||
extern MagickExport void
|
||||
Ascii85Encode(Image *,const unsigned char),
|
||||
Ascii85Flush(Image *),
|
||||
Ascii85Initialize(Image *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore configure methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CONFIGURE_H
|
||||
#define MAGICKCORE_CONFIGURE_H
|
||||
|
||||
#include "MagickCore/linked-list.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _ConfigureInfo
|
||||
{
|
||||
char
|
||||
*path,
|
||||
*name,
|
||||
*value;
|
||||
|
||||
MagickBooleanType
|
||||
exempt,
|
||||
stealth;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
} ConfigureInfo;
|
||||
|
||||
extern MagickExport char
|
||||
**GetConfigureList(const char *,size_t *,ExceptionInfo *),
|
||||
*GetConfigureOption(const char *);
|
||||
|
||||
extern MagickExport const char
|
||||
*GetConfigureValue(const ConfigureInfo *);
|
||||
|
||||
extern MagickExport const ConfigureInfo
|
||||
*GetConfigureInfo(const char *,ExceptionInfo *),
|
||||
**GetConfigureInfoList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport LinkedListInfo
|
||||
*DestroyConfigureOptions(LinkedListInfo *),
|
||||
*GetConfigurePaths(const char *,ExceptionInfo *),
|
||||
*GetConfigureOptions(const char *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
ListConfigureInfo(FILE *,ExceptionInfo *);
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image constitute methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_CONSTITUTE_H
|
||||
#define MAGICKCORE_CONSTITUTE_H
|
||||
|
||||
#include "MagickCore/pixel.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport Image
|
||||
*ConstituteImage(const size_t,const size_t,const char *,const StorageType,
|
||||
const void *,ExceptionInfo *),
|
||||
*PingImage(const ImageInfo *,ExceptionInfo *),
|
||||
*PingImages(ImageInfo *,const char *,ExceptionInfo *),
|
||||
*ReadImage(const ImageInfo *,ExceptionInfo *),
|
||||
*ReadImages(ImageInfo *,const char *,ExceptionInfo *),
|
||||
*ReadInlineImage(const ImageInfo *,const char *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
WriteImage(const ImageInfo *,Image *,ExceptionInfo *),
|
||||
WriteImages(const ImageInfo *,Image *,const char *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image decorate methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DECORATE_H
|
||||
#define MAGICKCORE_DECORATE_H
|
||||
|
||||
#include "MagickCore/image.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _FrameInfo
|
||||
{
|
||||
size_t
|
||||
width,
|
||||
height;
|
||||
|
||||
ssize_t
|
||||
x,
|
||||
y,
|
||||
inner_bevel,
|
||||
outer_bevel;
|
||||
} FrameInfo;
|
||||
|
||||
extern MagickExport Image
|
||||
*BorderImage(const Image *,const RectangleInfo *,const CompositeOperator,
|
||||
ExceptionInfo *),
|
||||
*FrameImage(const Image *,const FrameInfo *,const CompositeOperator,
|
||||
ExceptionInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
RaiseImage(Image *,const RectangleInfo *,const MagickBooleanType,
|
||||
ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore delegates methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DELEGATE_H
|
||||
#define MAGICKCORE_DELEGATE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "MagickCore/semaphore.h"
|
||||
|
||||
typedef struct _DelegateInfo
|
||||
{
|
||||
char
|
||||
*path,
|
||||
*decode,
|
||||
*encode,
|
||||
*commands;
|
||||
|
||||
ssize_t
|
||||
mode;
|
||||
|
||||
MagickBooleanType
|
||||
thread_support,
|
||||
spawn,
|
||||
stealth;
|
||||
|
||||
SemaphoreInfo
|
||||
*semaphore;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
} DelegateInfo;
|
||||
|
||||
extern MagickExport char
|
||||
*GetDelegateCommand(const ImageInfo *,Image *,const char *,const char *,
|
||||
ExceptionInfo *),
|
||||
**GetDelegateList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport const char
|
||||
*GetDelegateCommands(const DelegateInfo *);
|
||||
|
||||
extern MagickExport const DelegateInfo
|
||||
*GetDelegateInfo(const char *,const char *,ExceptionInfo *exception),
|
||||
**GetDelegateInfoList(const char *,size_t *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport int
|
||||
ExternalDelegateCommand(const MagickBooleanType,const MagickBooleanType,
|
||||
const char *,char *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport ssize_t
|
||||
GetDelegateMode(const DelegateInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
GetDelegateThreadSupport(const DelegateInfo *),
|
||||
InvokeDelegate(ImageInfo *,Image *,const char *,const char *,ExceptionInfo *),
|
||||
ListDelegateInfo(FILE *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore deprecated methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DEPRECATE_H
|
||||
#define MAGICKCORE_DEPRECATE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
|
||||
|
||||
#include "MagickCore/magick.h"
|
||||
|
||||
typedef int
|
||||
*(*BlobFifo)(const Image *,const void *,const size_t);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
GetMagickSeekableStream(const MagickInfo *);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore methods to interactively display and edit an image.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DISPLAY_H
|
||||
#define MAGICKCORE_DISPLAY_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
DisplayImages(const ImageInfo *,Image *,ExceptionInfo *),
|
||||
RemoteDisplayCommand(const ImageInfo *,const char *,const char *,
|
||||
ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore image distortion methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DISTORT_H
|
||||
#define MAGICKCORE_DISTORT_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
These two enum are linked, with common enumerated values. Both
|
||||
DistortImages() and SparseColor() often share code to determine functional
|
||||
coefficients for common methods.
|
||||
|
||||
Caution should be taken to ensure that only the common methods contain the
|
||||
same enumerated value, while all others remain unique across both
|
||||
enumerations.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
UndefinedDistortion,
|
||||
AffineDistortion,
|
||||
AffineProjectionDistortion,
|
||||
ScaleRotateTranslateDistortion,
|
||||
PerspectiveDistortion,
|
||||
PerspectiveProjectionDistortion,
|
||||
BilinearForwardDistortion,
|
||||
BilinearDistortion = BilinearForwardDistortion,
|
||||
BilinearReverseDistortion,
|
||||
PolynomialDistortion,
|
||||
ArcDistortion,
|
||||
PolarDistortion,
|
||||
DePolarDistortion,
|
||||
Cylinder2PlaneDistortion,
|
||||
Plane2CylinderDistortion,
|
||||
BarrelDistortion,
|
||||
BarrelInverseDistortion,
|
||||
ShepardsDistortion,
|
||||
ResizeDistortion,
|
||||
SentinelDistortion
|
||||
} DistortMethod;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedColorInterpolate = UndefinedDistortion,
|
||||
BarycentricColorInterpolate = AffineDistortion,
|
||||
BilinearColorInterpolate = BilinearReverseDistortion,
|
||||
PolynomialColorInterpolate = PolynomialDistortion,
|
||||
ShepardsColorInterpolate = ShepardsDistortion,
|
||||
/*
|
||||
Methods unique to SparseColor().
|
||||
*/
|
||||
VoronoiColorInterpolate = SentinelDistortion,
|
||||
InverseColorInterpolate,
|
||||
ManhattanColorInterpolate
|
||||
} SparseColorMethod;
|
||||
|
||||
extern MagickExport Image
|
||||
*AffineTransformImage(const Image *,const AffineMatrix *,ExceptionInfo *),
|
||||
*DistortImage(const Image *,const DistortMethod,const size_t,
|
||||
const double *,MagickBooleanType,ExceptionInfo *exception),
|
||||
*DistortResizeImage(const Image *,const size_t,const size_t,ExceptionInfo *),
|
||||
*RotateImage(const Image *,const double,ExceptionInfo *),
|
||||
*SparseColorImage(const Image *,const SparseColorMethod,const size_t,
|
||||
const double *,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore distributed cache methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DISTRIBUTE_CACHE_H
|
||||
#define MAGICKCORE_DISTRIBUTE_CACHE_H
|
||||
|
||||
#include "MagickCore/exception.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern MagickExport void
|
||||
DistributePixelCacheServer(const int,ExceptionInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,391 +0,0 @@
|
||||
/*
|
||||
Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
|
||||
dedicated to making software imaging solutions freely available.
|
||||
|
||||
You may not use this file except in compliance with the License.
|
||||
obtain a copy of the License at
|
||||
|
||||
https://www.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.
|
||||
|
||||
MagickCore drawing methods.
|
||||
*/
|
||||
#ifndef MAGICKCORE_DRAW_H
|
||||
#define MAGICKCORE_DRAW_H
|
||||
|
||||
#include "MagickCore/geometry.h"
|
||||
#include "MagickCore/image.h"
|
||||
#include "MagickCore/pixel.h"
|
||||
#include "MagickCore/type.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedAlign,
|
||||
LeftAlign,
|
||||
CenterAlign,
|
||||
RightAlign
|
||||
} AlignType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedPathUnits,
|
||||
UserSpace,
|
||||
UserSpaceOnUse,
|
||||
ObjectBoundingBox
|
||||
} ClipPathUnits;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedDecoration,
|
||||
NoDecoration,
|
||||
UnderlineDecoration,
|
||||
OverlineDecoration,
|
||||
LineThroughDecoration
|
||||
} DecorationType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedDirection,
|
||||
RightToLeftDirection,
|
||||
LeftToRightDirection
|
||||
} DirectionType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedRule,
|
||||
#undef EvenOddRule
|
||||
EvenOddRule,
|
||||
NonZeroRule
|
||||
} FillRule;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedGradient,
|
||||
LinearGradient,
|
||||
RadialGradient
|
||||
} GradientType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedCap,
|
||||
ButtCap,
|
||||
RoundCap,
|
||||
SquareCap
|
||||
} LineCap;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedJoin,
|
||||
MiterJoin,
|
||||
RoundJoin,
|
||||
BevelJoin
|
||||
} LineJoin;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedMethod,
|
||||
PointMethod,
|
||||
ReplaceMethod,
|
||||
FloodfillMethod,
|
||||
FillToBorderMethod,
|
||||
ResetMethod
|
||||
} PaintMethod;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedPrimitive,
|
||||
AlphaPrimitive,
|
||||
ArcPrimitive,
|
||||
BezierPrimitive,
|
||||
CirclePrimitive,
|
||||
ColorPrimitive,
|
||||
EllipsePrimitive,
|
||||
ImagePrimitive,
|
||||
LinePrimitive,
|
||||
PathPrimitive,
|
||||
PointPrimitive,
|
||||
PolygonPrimitive,
|
||||
PolylinePrimitive,
|
||||
RectanglePrimitive,
|
||||
RoundRectanglePrimitive,
|
||||
TextPrimitive
|
||||
} PrimitiveType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedReference,
|
||||
GradientReference
|
||||
} ReferenceType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UndefinedSpread,
|
||||
PadSpread,
|
||||
ReflectSpread,
|
||||
RepeatSpread
|
||||
} SpreadMethod;
|
||||
|
||||
typedef struct _StopInfo
|
||||
{
|
||||
PixelInfo
|
||||
color;
|
||||
|
||||
double
|
||||
offset;
|
||||
} StopInfo;
|
||||
|
||||
typedef struct _GradientInfo
|
||||
{
|
||||
GradientType
|
||||
type;
|
||||
|
||||
RectangleInfo
|
||||
bounding_box;
|
||||
|
||||
SegmentInfo
|
||||
gradient_vector;
|
||||
|
||||
StopInfo
|
||||
*stops;
|
||||
|
||||
size_t
|
||||
number_stops;
|
||||
|
||||
SpreadMethod
|
||||
spread;
|
||||
|
||||
MagickBooleanType
|
||||
debug;
|
||||
|
||||
PointInfo
|
||||
center,
|
||||
radii;
|
||||
|
||||
double
|
||||
radius,
|
||||
angle;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
} GradientInfo;
|
||||
|
||||
typedef struct _ElementReference
|
||||
{
|
||||
char
|
||||
*id;
|
||||
|
||||
ReferenceType
|
||||
type;
|
||||
|
||||
GradientInfo
|
||||
gradient;
|
||||
|
||||
struct _ElementReference
|
||||
*previous,
|
||||
*next;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
} ElementReference;
|
||||
|
||||
typedef struct _DrawInfo
|
||||
{
|
||||
char
|
||||
*primitive,
|
||||
*geometry;
|
||||
|
||||
RectangleInfo
|
||||
viewbox;
|
||||
|
||||
AffineMatrix
|
||||
affine;
|
||||
|
||||
PixelInfo
|
||||
fill,
|
||||
stroke,
|
||||
undercolor,
|
||||
border_color;
|
||||
|
||||
Image
|
||||
*fill_pattern,
|
||||
*stroke_pattern;
|
||||
|
||||
double
|
||||
stroke_width;
|
||||
|
||||
GradientInfo
|
||||
gradient;
|
||||
|
||||
MagickBooleanType
|
||||
stroke_antialias,
|
||||
text_antialias;
|
||||
|
||||
FillRule
|
||||
fill_rule;
|
||||
|
||||
LineCap
|
||||
linecap;
|
||||
|
||||
LineJoin
|
||||
linejoin;
|
||||
|
||||
size_t
|
||||
miterlimit;
|
||||
|
||||
double
|
||||
dash_offset;
|
||||
|
||||
DecorationType
|
||||
decorate;
|
||||
|
||||
CompositeOperator
|
||||
compose;
|
||||
|
||||
char
|
||||
*text,
|
||||
*font,
|
||||
*metrics,
|
||||
*family;
|
||||
|
||||
size_t
|
||||
face;
|
||||
|
||||
StyleType
|
||||
style;
|
||||
|
||||
StretchType
|
||||
stretch;
|
||||
|
||||
size_t
|
||||
weight;
|
||||
|
||||
char
|
||||
*encoding;
|
||||
|
||||
double
|
||||
pointsize;
|
||||
|
||||
char
|
||||
*density;
|
||||
|
||||
AlignType
|
||||
align;
|
||||
|
||||
GravityType
|
||||
gravity;
|
||||
|
||||
char
|
||||
*server_name;
|
||||
|
||||
double
|
||||
*dash_pattern;
|
||||
|
||||
char
|
||||
*clip_mask;
|
||||
|
||||
SegmentInfo
|
||||
bounds;
|
||||
|
||||
ClipPathUnits
|
||||
clip_units;
|
||||
|
||||
Quantum
|
||||
alpha;
|
||||
|
||||
MagickBooleanType
|
||||
render;
|
||||
|
||||
ElementReference
|
||||
element_reference;
|
||||
|
||||
double
|
||||
kerning,
|
||||
interword_spacing,
|
||||
interline_spacing;
|
||||
|
||||
DirectionType
|
||||
direction;
|
||||
|
||||
MagickBooleanType
|
||||
debug;
|
||||
|
||||
size_t
|
||||
signature;
|
||||
|
||||
double
|
||||
fill_alpha,
|
||||
stroke_alpha;
|
||||
} DrawInfo;
|
||||
|
||||
|
||||
typedef struct _PrimitiveInfo
|
||||
{
|
||||
PointInfo
|
||||
point;
|
||||
|
||||
size_t
|
||||
coordinates;
|
||||
|
||||
PrimitiveType
|
||||
primitive;
|
||||
|
||||
PaintMethod
|
||||
method;
|
||||
|
||||
char
|
||||
*text;
|
||||
} PrimitiveInfo;
|
||||
|
||||
typedef struct _TypeMetric
|
||||
{
|
||||
PointInfo
|
||||
pixels_per_em;
|
||||
|
||||
double
|
||||
ascent,
|
||||
descent,
|
||||
width,
|
||||
height,
|
||||
max_advance,
|
||||
underline_position,
|
||||
underline_thickness;
|
||||
|
||||
SegmentInfo
|
||||
bounds;
|
||||
|
||||
PointInfo
|
||||
origin;
|
||||
} TypeMetric;
|
||||
|
||||
extern MagickExport DrawInfo
|
||||
*AcquireDrawInfo(void),
|
||||
*CloneDrawInfo(const ImageInfo *,const DrawInfo *),
|
||||
*DestroyDrawInfo(DrawInfo *);
|
||||
|
||||
extern MagickExport MagickBooleanType
|
||||
DrawAffineImage(Image *,const Image *,const AffineMatrix *,ExceptionInfo *),
|
||||
DrawClipPath(Image *,const DrawInfo *,const char *,ExceptionInfo *),
|
||||
DrawGradientImage(Image *,const DrawInfo *,ExceptionInfo *),
|
||||
DrawImage(Image *,const DrawInfo *,ExceptionInfo *),
|
||||
DrawPatternPath(Image *,const DrawInfo *,const char *,Image **,
|
||||
ExceptionInfo *),
|
||||
DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *,ExceptionInfo *);
|
||||
|
||||
extern MagickExport void
|
||||
GetAffineMatrix(AffineMatrix *),
|
||||
GetDrawInfo(const ImageInfo *,DrawInfo *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||