ric9k
11 March 2022 22:47
1
I am using Imagemagick in SFOS CLI to create kind of a post-it image.
When I superimpose the yellow image on its shadow, it becomes white.
Doing this on my linux PC is working.
Do I missuse IM due to a different version?
Create a transparent canvas:
convert -size 100x100 xc:none canvas.png
Create a shadow:
convert -size 60x60 xc:black shadow.png
Superimpose the shadow and the canvas:
convert canvas.png shadow.png -gravity center -composite canvas2.png
Blur it to make it look like a shadow:
convert canvas2.png -blur 0x6 blurred_canvas2.png
Create the yellow “paper”:
convert -size 72x72 xc:yellow paper.png
Superimpose the post-it on the shadow:
convert blurred_canvas2.png paper.png -gravity northeast -geometry +10+10 -composite shadowed_paper.png
Result on PC:
Result on SFOS:
It’s working perfect until end of step 5 but then, the “paper” loses its color into step 6.
I can confirm the white result on my sfos device.
However, my Linux PC also produces white.
Do you have a third machine to test on so we can have a quorum?
ric9k
12 March 2022 07:54
3
Also white? This is interesting.
On my N900 it keeps the yellow.
Did you compile IM for SFOS on the same computer?
I use the IM from chum (or openrepos-nephros but that’s older), and the current Gentoo package on the PC.
1 Like
Gentoo:
Version: ImageMagick 7.1.0-13 Q16-HDRI i686 2021-10-29 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype jng jp2 jpeg lcms ltdl lzma png rsvg
tiff wmf x xml zlib
Compiler: gcc (10.3)
Sailfish:
nemo@PGXperia10:~ $ convert --version
Version: ImageMagick 7.1.0-27 Q16-HDRI armv7l 2022-02-26 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): bzlib fontconfig freetype jng jpeg ltdl lzma pangocairo png tiff webp xml zlib
Compiler: gcc (8.3)
1 Like
attah
12 March 2022 09:01
6
Use this (add colorspace):
convert blurred_canvas2.png paper.png -colorspace RGB -gravity northeast -geometry +10+10 -composite shadowed_paper.png
2 Likes
ric9k
12 March 2022 09:15
7
Magnificent! Thank you very much!
1 Like
ric9k
12 March 2022 09:19
8
On my PC:
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: ImageMagick – License
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
On SFOS:
Same as yours
ric9k
12 March 2022 09:21
9
Just a typo: shadowed_paper.png
, not shad owed_paper.png
attah
12 March 2022 09:26
10
Ooops… copy-pasting from terminal did that.
1 Like