How to convert image to 1/4/8/16/24/32/48/64 bit image?

Hi,Support:

Is there any method to convert image to 1/4/8/16/24/32/48/64 bit image for this api based on VB.net?
Thanks for your help!

@ducaisoft

Please check supported ColorMode/BitDepth combinations by PSD Format. So, PSD Format can handle only 1, 8, 16, 32 bit depth. And BitDepth 1 is possible in in combination with Bitmap Color Mode.

We can process some of them, but after the investigation, conversion from 8 bit to 1, 16 and 32 creates broken file.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PSDNET-1907,PSDNET-1906,PSDNET-1905

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thanks for your reply.
Would you please provide me a full demo based on VB.net to show how to convert any image to given color bit new image and save to local file?

@ducaisoft

It should work with this code for 16 bit:

    Using img As PsdImage = Aspose.PSD.Image.Load("AllTypesLayerPsd.psd")
        Dim psdOpt = New PsdOptions()
        psdOpt.ChannelBitsCount = 16

        img.Save("Vb16.export.psd", psdOpt)
    End Using

For other bit depth please change bits count to needed value.

Thanks very much.
I test this,the result is that:
Convert to 1/4/8/16/24/32/48/64 bit and jpgOpt.BitsPerChannel = NewColorBit, and then save as Jpg image to file, the 1/4/16/24/32/48/64 bit images are corrupted.

Convert to 1/4/8/16/24/32/48/64 bit and pngOpt.BitDepth = NewColorBit, and then save as png image to file, the 1/4/16/24/32/48/64 bit images are corrupted.

Convert to 1/4/8/16/24/32/48/64 bit and BmpOpt.BitsPerPixel = NewColorBit, and then save as bmp image to file, the 1/4/8/24/48/64 bit images are corrupted.

what’s wrong about the api?

@ducaisoft
Jpeg format only supports 8 bit per pixel. It looks like we faced with regressuion. I’ll write later after the investigation.

@ducaisoft

I can confirm issue with converting to Png.

Converting to BMP supports 8, 16 and 32 bits per pixel.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in {policies_url}.

Issue ID(s): PSDNET-1907,PSDNET-1906,PSDNET-1905,PSDNET-1909,PSDNET-1910

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as PSDNET-1905,PSDNET-1906) have been fixed in this update. This message was posted using Bugs notification tool by yaroslav.lisovskyi