Abstraction layer over GraphicsMagick. On Linux, install the package
graphicsmagick
:
$ sudo apt-get install graphicsmagick
For a list of all fonts supported by GraphicsMagick, run:
$ gm convert -list font
Path: /usr/local/lib/GraphicsMagick/config/type-windows.mgk
Name Family Style Stretch Weight
--------------------------------------------------------------------------------
Arial Arial normal normal 400
Arial-Black Arial normal normal 900
Arial-Bold Arial normal normal 700
Arial-Bold-Italic Arial italic normal 700
Arial-Italic Arial italic normal 400
...
Edit /usr/local/lib/GraphicsMagick/config/type.mgk
to set a custom
font configuration. Use the Perl script imagick_type_gen.pl
to
generate a type file type-custom.mgk
, for example:
$ find /usr/local/share/fonts/ -type f -name "*.*" | perl ./imagick_type_gen.pl -f - > type-custom.mgk
Copy the type file to the config/
directory of GraphicsMagick and
modify the path to the include file in type.mgk
accordingly.
Example to read meta data of image /tmp/image.jpg
:
character(len=*), parameter :: IMAGE_PATH = '/tmp/image.jpg'
character(len=:), allocatable :: directory, format, mime
integer :: width, height
integer :: rc
rc = dm_gm_get_dimensions(IMAGE_PATH, width, height)
print '("image dimensions: ", i0, "x", i0)', width, height
rc = dm_gm_get_directory(IMAGE_PATH, directory)
print '("directory: ", a)', directory
rc = dm_gm_get_file_format(IMAGE_PATH, format)
print '("format: ", a)', format
rc = dm_gm_get_mime(IMAGE_PATH, mime)
print '("MIME: ", a)', mime
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | GM_COLOR_LEN | = | 16 |
Max. length of GM colour name. |
integer, | public, | parameter | :: | GM_COMMAND_LEN | = | FILE_PATH_LEN |
Max. length of command string. |
integer, | public, | parameter | :: | GM_FONT_LEN | = | 64 |
Max. length of GM font name. |
integer, | public, | parameter | :: | GM_GRAVITY_LEN | = | 9 |
Max. length of GM gravity. |
character(len=*), | public, | parameter | :: | GM_GRAVITY_E | = | 'East' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_N | = | 'North' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_NE | = | 'NorthEast' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_NW | = | 'NorthWest' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_S | = | 'South' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_SE | = | 'SouthEast' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_SW | = | 'SouthWest' | |
character(len=*), | public, | parameter | :: | GM_GRAVITY_W | = | 'West' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ALICE_BLUE | = | 'aliceblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ANTIQUE_WHITE | = | 'antiquewhite' | |
character(len=*), | public, | parameter | :: | GM_COLOR_AQUA | = | 'aqua' | |
character(len=*), | public, | parameter | :: | GM_COLOR_AQUA_MARINE | = | 'aquamarine' | |
character(len=*), | public, | parameter | :: | GM_COLOR_AZURE | = | 'azure' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BEIGE | = | 'beige' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BISQUE | = | 'bisque' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BLACK | = | 'black' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BLANCHE_DALMOND | = | 'blanchedalmond' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BLUE | = | 'blue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BLUE_VIOLET | = | 'blueviolet' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BROWN | = | 'brown' | |
character(len=*), | public, | parameter | :: | GM_COLOR_BURLY_WOOD | = | 'burlywood' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CADET_BLUE | = | 'cadetblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CHARTREUSE | = | 'chartreuse' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CHOCOLATE | = | 'chocolate' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CORAL | = | 'coral' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CORN_FLOWER_BLUE | = | 'cornflowerblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CORN_SILK | = | 'cornsilk' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CRIMSON | = | 'crimson' | |
character(len=*), | public, | parameter | :: | GM_COLOR_CYAN | = | 'cyan' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_BLUE | = | 'darkblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_CYAN | = | 'darkcyan' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_GOLDEN_ROD | = | 'darkgoldenrod' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_GRAY | = | 'darkgray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_GREEN | = | 'darkgreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_GREY | = | 'darkgrey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_KHAKI | = | 'darkkhaki' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_MAGENTA | = | 'darkmagenta' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_OLIVE_GREEN | = | 'darkolivegreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_ORANGE | = | 'darkorange' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_ORCHID | = | 'darkorchid' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_RED | = | 'darkred' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_SALMON | = | 'darksalmon' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_SEA_GREEN | = | 'darkseagreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_SLATE_BLUE | = | 'darkslateblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_SLATE_GRAY | = | 'darkslategray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_SLATE_GREY | = | 'darkslategrey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_TURQUOISE | = | 'darkturquoise' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DARK_VIOLET | = | 'darkviolet' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DEEP_PINK | = | 'deeppink' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DEEP_SKY_BLUE | = | 'deepskyblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DIM_GRAY | = | 'dimgray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DIM_GREY | = | 'dimgrey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_DODGER_BLUE | = | 'dodgerblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_FIRE_BRICK | = | 'firebrick' | |
character(len=*), | public, | parameter | :: | GM_COLOR_FLORAL_WHITE | = | 'floralwhite' | |
character(len=*), | public, | parameter | :: | GM_COLOR_FOREST_GREEN | = | 'forestgreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_FRACTAL | = | 'fractal' | |
character(len=*), | public, | parameter | :: | GM_COLOR_FUCHSIA | = | 'fuchsia' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GAINSBORO | = | 'gainsboro' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GHOST_WHITE | = | 'ghostwhite' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GOLD | = | 'gold' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GOLDE_NROD | = | 'goldenrod' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY | = | 'gray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY0 | = | 'gray0' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY1 | = | 'gray1' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY2 | = | 'gray2' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY3 | = | 'gray3' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY4 | = | 'gray4' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY5 | = | 'gray5' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY6 | = | 'gray6' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY7 | = | 'gray7' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY8 | = | 'gray8' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY9 | = | 'gray9' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY10 | = | 'gray10' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY11 | = | 'gray11' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY12 | = | 'gray12' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY13 | = | 'gray13' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY14 | = | 'gray14' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY15 | = | 'gray15' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY16 | = | 'gray16' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY17 | = | 'gray17' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY18 | = | 'gray18' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY19 | = | 'gray19' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY20 | = | 'gray20' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY21 | = | 'gray21' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY22 | = | 'gray22' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY23 | = | 'gray23' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY24 | = | 'gray24' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY25 | = | 'gray25' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY26 | = | 'gray26' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY27 | = | 'gray27' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY28 | = | 'gray28' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY29 | = | 'gray29' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY30 | = | 'gray30' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY31 | = | 'gray31' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY32 | = | 'gray32' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY33 | = | 'gray33' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY34 | = | 'gray34' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY35 | = | 'gray35' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY36 | = | 'gray36' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY37 | = | 'gray37' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY38 | = | 'gray38' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY39 | = | 'gray39' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY40 | = | 'gray40' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY41 | = | 'gray41' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY42 | = | 'gray42' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY43 | = | 'gray43' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY44 | = | 'gray44' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY45 | = | 'gray45' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY46 | = | 'gray46' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY47 | = | 'gray47' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY48 | = | 'gray48' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY49 | = | 'gray49' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY50 | = | 'gray50' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY51 | = | 'gray51' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY52 | = | 'gray52' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY53 | = | 'gray53' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY54 | = | 'gray54' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY55 | = | 'gray55' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY56 | = | 'gray56' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY57 | = | 'gray57' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY58 | = | 'gray58' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY59 | = | 'gray59' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY60 | = | 'gray60' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY61 | = | 'gray61' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY62 | = | 'gray62' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY63 | = | 'gray63' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY64 | = | 'gray64' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY65 | = | 'gray65' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY66 | = | 'gray66' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY67 | = | 'gray67' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY68 | = | 'gray68' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY69 | = | 'gray69' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY70 | = | 'gray70' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY71 | = | 'gray71' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY72 | = | 'gray72' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY73 | = | 'gray73' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY74 | = | 'gray74' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY75 | = | 'gray75' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY76 | = | 'gray76' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY77 | = | 'gray77' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY78 | = | 'gray78' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY79 | = | 'gray79' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY80 | = | 'gray80' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY81 | = | 'gray81' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY82 | = | 'gray82' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY83 | = | 'gray83' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY84 | = | 'gray84' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY85 | = | 'gray85' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY86 | = | 'gray86' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY87 | = | 'gray87' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY88 | = | 'gray88' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY89 | = | 'gray89' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY90 | = | 'gray90' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY91 | = | 'gray91' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY92 | = | 'gray92' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY93 | = | 'gray93' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY94 | = | 'gray94' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY95 | = | 'gray95' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY96 | = | 'gray96' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY97 | = | 'gray97' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY98 | = | 'gray98' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY99 | = | 'gray99' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GRAY100 | = | 'gray100' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GREEN | = | 'green' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GREEN_YELLOW | = | 'greenyellow' | |
character(len=*), | public, | parameter | :: | GM_COLOR_GREY | = | 'grey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_HONEY_DEW | = | 'honeydew' | |
character(len=*), | public, | parameter | :: | GM_COLOR_HOT_PINK | = | 'hotpink' | |
character(len=*), | public, | parameter | :: | GM_COLOR_INDIAN_RED | = | 'indianred' | |
character(len=*), | public, | parameter | :: | GM_COLOR_INDIGO | = | 'indigo' | |
character(len=*), | public, | parameter | :: | GM_COLOR_IVORY | = | 'ivory' | |
character(len=*), | public, | parameter | :: | GM_COLOR_KHAKI | = | 'khaki' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LAVENDER | = | 'lavender' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LAVENDER_BLUSH | = | 'lavenderblush' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LAWN_GREEN | = | 'lawngreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LEMON_CHIFFON | = | 'lemonchiffon' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_BLUE | = | 'lightblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_CORAL | = | 'lightcoral' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_CYAN | = | 'lightcyan' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_GOLDEN_ROD_YELLOW | = | 'lightgoldenrodyellow' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_GRAY | = | 'lightgray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_GREEN | = | 'lightgreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_GREY | = | 'lightgrey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_PINK | = | 'lightpink' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_SALMON | = | 'lightsalmon' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_SEA_GREEN | = | 'lightseagreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_SKY_BLUE | = | 'lightskyblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_SLATE_GRAY | = | 'lightslategray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_SLATE_GREY | = | 'lightslategrey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_STEEL_BLUE | = | 'lightsteelblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIGHT_YELLOW | = | 'lightyellow' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIME | = | 'lime' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LIME_GREEN | = | 'limegreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_LINEN | = | 'linen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MAGENTA | = | 'magenta' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MAROON | = | 'maroon' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_AQUA_MARINE | = | 'mediumaquamarine' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_BLUE | = | 'mediumblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_ORCHID | = | 'mediumorchid' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_PURPLE | = | 'mediumpurple' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_SEA_GREEN | = | 'mediumseagreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_SLATE_BLUE | = | 'mediumslateblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_SPRING_GREEN | = | 'mediumspringgreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_TURQUOISE | = | 'mediumturquoise' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MEDIUM_VIOLET_RED | = | 'mediumvioletred' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MIDNIGHT_BLUE | = | 'midnightblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MINT_CREAM | = | 'mintcream' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MISTY_ROSE | = | 'mistyrose' | |
character(len=*), | public, | parameter | :: | GM_COLOR_MOCCASIN | = | 'moccasin' | |
character(len=*), | public, | parameter | :: | GM_COLOR_NAVAJO_WHITE | = | 'navajowhite' | |
character(len=*), | public, | parameter | :: | GM_COLOR_NAVY | = | 'navy' | |
character(len=*), | public, | parameter | :: | GM_COLOR_NONE | = | 'none' | |
character(len=*), | public, | parameter | :: | GM_COLOR_OLD_LACE | = | 'oldlace' | |
character(len=*), | public, | parameter | :: | GM_COLOR_OLIVE | = | 'olive' | |
character(len=*), | public, | parameter | :: | GM_COLOR_OLIVE_DRAB | = | 'olivedrab' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ORANGE | = | 'orange' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ORANGE_RED | = | 'orangered' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ORCHID | = | 'orchid' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PALE_GOLDEN_ROD | = | 'palegoldenrod' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PALE_GREEN | = | 'palegreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PALE_TURQUOISE | = | 'paleturquoise' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PALE_VIOLET_RED | = | 'palevioletred' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PAPAYA_WHIP | = | 'papayawhip' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PEACH_PUFF | = | 'peachpuff' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PERU | = | 'peru' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PINK | = | 'pink' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PLUM | = | 'plum' | |
character(len=*), | public, | parameter | :: | GM_COLOR_POWDER_BLUE | = | 'powderblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_PURPLE | = | 'purple' | |
character(len=*), | public, | parameter | :: | GM_COLOR_RED | = | 'red' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ROSY_BROWN | = | 'rosybrown' | |
character(len=*), | public, | parameter | :: | GM_COLOR_ROYAL_BLUE | = | 'royalblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SADDLE_BROWN | = | 'saddlebrown' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SALMON | = | 'salmon' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SANDY_BROWN | = | 'sandybrown' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SEA_GREEN | = | 'seagreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SEA_SHELL | = | 'seashell' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SIENNA | = | 'sienna' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SILVER | = | 'silver' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SKY_BLUE | = | 'skyblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SLATE_BLUE | = | 'slateblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SLATE_GRAY | = | 'slategray' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SLATE_GREY | = | 'slategrey' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SNOW | = | 'snow' | |
character(len=*), | public, | parameter | :: | GM_COLOR_SPRING_GREEN | = | 'springgreen' | |
character(len=*), | public, | parameter | :: | GM_COLOR_STEEL_BLUE | = | 'steelblue' | |
character(len=*), | public, | parameter | :: | GM_COLOR_TAN | = | 'tan' | |
character(len=*), | public, | parameter | :: | GM_COLOR_TEAL | = | 'teal' | |
character(len=*), | public, | parameter | :: | GM_COLOR_THISTLE | = | 'thistle' | |
character(len=*), | public, | parameter | :: | GM_COLOR_TOMATO | = | 'tomato' | |
character(len=*), | public, | parameter | :: | GM_COLOR_TURQUOISE | = | 'turquoise' | |
character(len=*), | public, | parameter | :: | GM_COLOR_VIOLET | = | 'violet' | |
character(len=*), | public, | parameter | :: | GM_COLOR_WHEAT | = | 'wheat' | |
character(len=*), | public, | parameter | :: | GM_COLOR_WHITE | = | 'white' | |
character(len=*), | public, | parameter | :: | GM_COLOR_WHITE_SMOKE | = | 'whitesmoke' | |
character(len=*), | public, | parameter | :: | GM_COLOR_YELLOW | = | 'yellow' | |
character(len=*), | public, | parameter | :: | GM_COLOR_YELLOW_GREEN | = | 'yellowgreen' |
Text box settings for drawing text on image.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=GM_GRAVITY_LEN), | public | :: | gravity | = | GM_GRAVITY_SW |
Text position (GM). |
|
character(len=GM_COLOR_LEN), | public | :: | background | = | GM_COLOR_BLACK |
Box colour (GM). |
|
character(len=GM_COLOR_LEN), | public | :: | foreground | = | GM_COLOR_WHITE |
Text colour (GM). |
|
character(len=GM_FONT_LEN), | public | :: | font | = | 'DejaVuSansMono' |
Font name (GM). |
|
integer, | public | :: | font_size | = | 12 |
Font size in points. |
Draws text camera image file, using GraphicsMagick. By default, the text box is drawn to the bottom-left corner of the image. If no text box is passed, the default values of the derived type are used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
character(len=*), | intent(in) | :: | text |
Text to add. |
||
type(gm_text_box_type), | intent(in), | optional | :: | text_box |
Image text box type. |
|
character(len=:), | intent(out), | optional, | allocatable | :: | command |
Executed command. |
Uses GraphicsMagick to determine the dimensions of the image at given path. On error, width and height are 0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
integer, | intent(out) | :: | width |
Image width. |
||
integer, | intent(out) | :: | height |
Image height. |
Uses GraphicsMagick to return the directory part of the image path.
On error, the string directory
is allocated but empty.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
character(len=:), | intent(out), | allocatable | :: | directory |
Image file directory. |
Uses GraphicsMagick to read the image file extension (jpg
,
png
, ...). On error, the string file_format
is allocated but
empty.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
character(len=:), | intent(out), | allocatable | :: | extension |
Image file extension. |
Uses GraphicsMagick to determine the image file format (JPEG
,
PNG
, ...). On error, the string file_format
is allocated but
empty.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
character(len=:), | intent(out), | allocatable | :: | file_format |
Image file format. |
Uses GraphicsMagick to return the file name part of the image path.
On error, the string file_name
is allocated but empty.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
character(len=:), | intent(out), | allocatable | :: | file_name |
Image file name. |
Determines the MIME type of the image through file format. The
following file formats are recognised: GIF, JPEG, PNG, SVG. On
error, the string mime
is allocated but empty.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | path |
Image file path. |
||
character(len=:), | intent(out), | allocatable | :: | mime |
MIME type. |