[Scilab-users] saving an image as b/w image

Chin Luh Tan chinluh.tan at bytecode-asia.com
Mon Jul 13 03:27:21 CEST 2020


Hi,


I have not dive into different image formats but base on previous experience, i believe Stephane was right about this. So far when dealing with different bits per pixel, tif could be the way to go. The tif created by imwrite would be able to read by imread without any issue. 



ps: In Scilab, binary image should be in %t, %f, however, some functions might not support binary so you might need to convert to relevant format before operation. 



ps2: If I remember correctly %t %f were detected as int32 in C gateway. so, there might be something still not fully covered during conversion. 



thanks.



rgds,

CL 



---- On Sat, 11 Jul 2020 00:42:14 +0800 Stéphane Mottelet <stephane.mottelet at utc.fr> wrote ----



Hi,

True BW Jpeg is not possible. Use TIFF format instead.

S.

Le 10/07/2020 à 15:52, P M a écrit :

Dear Experts,



I try to save a black/white image as a binary image.



That means: An image with bit depth of 1.



"imwrite" from IPCV however seems to save the image at
          least as a 8-bit-image.



The array I want to save as an image consists of "0" and
          "1" only.



The output file type must be ".jpg".



Thank you,

Philipp












_______________________________________________
users mailing list
mailto:users at lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users



-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet



_______________________________________________

users mailing list 

users at lists.scilab.org 

http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200713/fd9d50f6/attachment.htm>


More information about the users mailing list