Skip to content

HEIC: Unsupported feature: Unsupported color conversion #102

@ghost

Description

I'm trying to process a heic file, but I got the following exception (using latest version):

System.InvalidOperationException
  HResult=0x80131509
  Message=Unsupported feature: Unsupported color conversion
  Source=PhotoSauce.NativeCodecs.Libheif
  StackTrace:
   at PhotoSauce.NativeCodecs.Libheif.HeifResult.Check(heif_error err)
   at PhotoSauce.NativeCodecs.Libheif.HeifContainer.HeifPixelSource.decodeImage()
   at PhotoSauce.NativeCodecs.Libheif.HeifContainer.HeifPixelSource.CopyPixelsInternal(PixelArea& prc, Int32 cbStride, Int32 cbBufferSize, Byte* pbBuffer)
   at PhotoSauce.MagicScaler.Transforms.ConversionTransform.copyPixelsDirect(PixelArea& prc, Int32 cbStride, Byte* pbBuffer)
   at PhotoSauce.MagicScaler.PixelSource.CopyPixels(PixelArea& prc, Int32 cbStride, Int32 cbBufferSize, Byte* pbBuffer)
   at PhotoSauce.Interop.Wic.IWICBitmapSourceImpl.copyPixels(IWICBitmapSource* pinst, WICRect* prc, UInt32 cbStride, UInt32 cbBufferSize, Byte* pbBuffer)
   at TerraFX.Interop.Windows.IWICBitmapFrameEncode.WriteSource(IWICBitmapSource* pIBitmapSource, WICRect* prc)
   at PhotoSauce.MagicScaler.WicImageEncoder.writeSource(IWICBitmapFrameEncode* frame, PixelSource src, PixelArea area)
   at PhotoSauce.MagicScaler.WicImageEncoder.WriteFrame(IPixelSource source, IMetadataSource meta, Rectangle area)
   at PhotoSauce.MagicScaler.MagicImageProcessor.WriteOutput(PipelineContext ctx, Stream ostm)
   at PhotoSauce.MagicScaler.MagicImageProcessor.ProcessImage(String imgPath, String outPath, ProcessImageSettings settings)
   at xxx

File properties:
image
image
image

Windows Photos can show the file.

Unfortunately I can't share the file, can I send it privately to you?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions