Removed png as default mode.
the build was successful
Details
the build was successful
Details
Image format is now selected by file extension or magick().
This commit is contained in:
parent
9c60212ca8
commit
42e7fd9a18
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.2)
|
cmake_minimum_required (VERSION 3.2)
|
||||||
project(identiconpp
|
project(identiconpp
|
||||||
VERSION 0.3.0
|
VERSION 0.3.1
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,8 @@ int main(int argc, char *argv[])
|
||||||
});
|
});
|
||||||
img = identicon.generate(digest, 500);
|
img = identicon.generate(digest, 500);
|
||||||
img.write("identicon_example_ltr_asymmetric.png");
|
img.write("identicon_example_ltr_asymmetric.png");
|
||||||
|
img.magick("GIF");
|
||||||
|
img.write("identicon_example_ltr_asymmetric.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -62,6 +64,7 @@ int main(int argc, char *argv[])
|
||||||
});
|
});
|
||||||
img = identicon.generate(digest, 500);
|
img = identicon.generate(digest, 500);
|
||||||
img.write("identicon_example_sigil.png");
|
img.write("identicon_example_sigil.png");
|
||||||
|
img.write("identicon_example_sigil.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -74,7 +74,6 @@ Magick::Image Identiconpp::generate(const string &digest, const uint16_t width)
|
||||||
img.scale(Magick::Geometry(imgwidth, imgheight));
|
img.scale(Magick::Geometry(imgwidth, imgheight));
|
||||||
img.borderColor(Magick::Color('#' + _background));
|
img.borderColor(Magick::Color('#' + _background));
|
||||||
img.border(Magick::Geometry(_padding[0], _padding[1]));
|
img.border(Magick::Geometry(_padding[0], _padding[1]));
|
||||||
img.magick("png");
|
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
* @param digest The pre-computed digest
|
* @param digest The pre-computed digest
|
||||||
* @param width The width of the image in pixels
|
* @param width The width of the image in pixels
|
||||||
*
|
*
|
||||||
* @return The image
|
* @return The image as Magick::Image
|
||||||
*/
|
*/
|
||||||
Magick::Image generate(const string &digest, const uint16_t width = 100);
|
Magick::Image generate(const string &digest, const uint16_t width = 100);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue