Convert from Bitmap

Dec 7, 2011 at 4:08 PM

I need to convert bmp images to JPEG-LS format. Does anyone have any working example of how this is done?

Any help is highly appreciated!!!!

Developer
Dec 8, 2011 at 10:43 PM

In which language (C# \ C++) do you want an example?

Dec 9, 2011 at 5:47 AM

I prefer C#. However if there is C++, I can live with it. Thanks!

Developer
Dec 11, 2011 at 11:06 PM

I uploaded a sample. It is not finished yet (the output stream for 24bit color bmp's cannot yet be viewed with irfanview)

Dec 12, 2011 at 7:11 AM

Thanks a lot!

Developer
Dec 12, 2011 at 9:12 PM

Resolved issue for 24bit color bmps. Encoded 24bit color bmps can be viewed with irfanview.

Jan 14, 2012 at 6:55 AM

In one of the replies, it is stated that the code for converting bmp images to jpeg-ls format is done and uploaded. Where is it uploaded? I want to download this bmp image converter. Can anyone provide the link?

Developer
Jan 14, 2012 at 2:42 PM

If you download the latest "change set" from the "source code" page you will get the current source snapshot. This includes the C# sample.

Jan 17, 2012 at 11:10 AM

I have not ever used C#.

Does anyone have the C sample code for converting 8 bpp BMP images.

Jan 20, 2012 at 5:42 PM

I downloaded the latest change set(i.e. 72278) and unziped it. Inside there are many folder and file. There is no documentation. How can use it. Please guide me in compressing 8bpp bmp images using CharLS library.

Developer
Jan 28, 2012 at 1:37 PM

The unit tests of the CharLS and the C# could be used as guidance how to create an application in C how to convert 8bpp to jpeg-ls encoded images.

I have created a work item on the backlog for such a sample. 

Feb 1, 2012 at 11:03 AM
Edited Feb 1, 2012 at 3:45 PM

I successfully compiled the CharLS library by running following command

cmake [-G Unix Makefiles] /home/khursheed/CharLS-source-1.0

make

This produced some other files along with charlstest exe file in the directory.

Now I want to use this compiled CharLS library for compressing any kind of bmp images( Either 8 bpp or 24 bpp). As someone else already used CharLS libaŕary for compressing 24 bit bmp images. They are saying that the code is uploaded to the change set part of this web page. But  I do not know how can I use that change set.

Please tell me all the steps for compiling the code from change set to compress any bmp image. I will appreciate it greatly.

I just want to compile the application from change set and then execute the generated exe file to compress bmp images.

Feb 1, 2012 at 12:24 PM
Edited Feb 1, 2012 at 5:47 PM

I have downloaded the latest change set. The C# sample code for converting bmp images is in

/home/khursheed/charls-72278/trunk/charls/samples/convert

I tried to compile this C# sample but got the errors below.

Can anyone help me in removing these errors. I will greatly appreciate any help.

khursheed@khursheed-desktop:~/charls-72278/trunk/charls/samples/convert$ gmcs Program.cs

Program.cs(7,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Program.cs(8,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Program.cs(9,7): error CS0246: The type or namespace name `CharLS' could not be found. Are you missing a using directive or an assembly reference?
Program.cs(7,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Program.cs(8,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Program.cs(9,7): error CS0246: The type or namespace name `CharLS' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 6 error(s), 0 warnings

Oct 16, 2012 at 6:22 AM

Could you please add a C# sample of decoding .jls files into .bmp?

Apr 14, 2014 at 3:38 AM
Convert from Bitmap - Image Convert

I prefer C# too, so any C# example code?
Developer
Apr 16, 2014 at 11:13 PM
The latest source code contains some samples in C#: /trunk/charls/samples/
Apr 17, 2014 at 4:01 AM
Hi, vbaderks.
Thanks!