added documentation for converting to RGBA png type (which is supported)
This commit is contained in:
parent
d4946a29d1
commit
18938dd2a0
|
@ -1,3 +1,5 @@
|
|||
# cowmic
|
||||
|
||||
generates memes
|
||||
|
||||
`mogrify -define png:format=png32 -format png *.png`
|
||||
|
|
|
@ -9,7 +9,7 @@ pub struct Template<T: AsRef<str>, V: AsRef<Path>> {
|
|||
|
||||
impl<T: AsRef<str>, V: AsRef<Path>> Template<T, V> {
|
||||
pub fn new(base: Vec<u8>, elements: Vec<Element<T, V>>) -> Result<Self, CowError> {
|
||||
let base: Image = Image::from_bytes_inferred(base)?;
|
||||
let base: Image<Dynamic> = Image::from_bytes_inferred(base)?;
|
||||
Ok(Self {
|
||||
dimensions: base.dimensions(),
|
||||
elements,
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 132 KiB |
|
@ -4,7 +4,7 @@ use cowgen::{CowError, Element, Text};
|
|||
|
||||
fn main() -> Result<(), CowError> {
|
||||
let out = cowgen::Template::new(
|
||||
include_bytes!("cow.png").to_vec(),
|
||||
include_bytes!("cow2.png").to_vec(),
|
||||
vec![Element::new(
|
||||
cowgen::Media::Text(Text::new(
|
||||
"Hello",
|
||||
|
|
Loading…
Reference in New Issue