[Gambas-user] Sample code to convert image to b/w image

Benoît Minisini benoit.minisini at gambas-basic.org
Sat Sep 16 22:16:51 CEST 2023


Le 16/09/2023 à 21:34, Safiur Rahman a écrit :
> Hi
> 
> I want to achieve the following black-in-white image output with 
> Imagemagick with gambas
> $ convert old.png -alpha off -threshold 50% new.png
> 
> Any sample code to achieve it?
> 
> Also using Image.Opacity and Image.Threshold, I get following errors
> 
> With Image.Opacity(50) I am getting error "The image must have an alpha 
> channel"
> With Image.Threshold(0.5) the gambas crashed.
> 
> 
> 
> -- 
> Regards
> Safiur Rahman
> 

Please can you provide a small project that reproduces the crash?

-- 
Benoît Minisini.



More information about the User mailing list