Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create image decoder with message 'unimplemented' #25

Closed
arahmancsd opened this issue Apr 9, 2024 · 2 comments
Closed

Failed to create image decoder with message 'unimplemented' #25

arahmancsd opened this issue Apr 9, 2024 · 2 comments

Comments

@arahmancsd
Copy link

Description

When loading SVG image from a URL, I am getting the error in the title.

Steps to Reproduce

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue:
  • Last known good version:
  • Platform:

Screenshots

Reproduction Link / Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="wQuran.NewPage1"
             xmlns:ffimageloading="clr-namespace:FFImageLoading.Maui;assembly=FFImageLoading.Maui"
             Title="NewPage1">
    
    
    <Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
        <ffimageloading:CachedImage HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
        Source="https://muslimpillarsapp.blob.core.windows.net/reciters-photo/001.svg"
                                ></ffimageloading:CachedImage>

    </Grid>
</ContentPage>

[DOTNET] Generating/retrieving image: https://muslimpillarsapp.blob.core.windows.net/reciters-photo/001.svg
Thread started: #21
[TrafficStats] tagSocket(111) with statsTag=0xffffffff, statsUid=-1
[monodroid-assembly] open_from_bundles: failed to load assembly System.IO.Compression.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.IO.Compression.Brotli.dll
Loaded assembly: /data/data/com.AZEE.wquran/files/.override/System.IO.Compression.dll [External]
Loaded assembly: /data/data/com.AZEE.wquran/files/.override/System.IO.Compression.Brotli.dll [External]
Thread started: #22
[OpenGLRenderer] --- Failed to create image decoder with message 'unimplemented'
[OpenGLRenderer] --- Failed to create image decoder with message 'unimplemented'
[DOTNET] Image loading failed: https://muslimpillarsapp.blob.core.windows.net/reciters-photo/001.svg
[DOTNET] System.BadImageFormatException: Not a valid bitmap
[DOTNET] at FFImageLoading.PlatformImageLoaderTask1[[Android.Widget.ImageView, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].GenerateImageFromDecoderContainerAsync(IDecodedImage1 decoded, ImageInformation imageInformation, Boolean isPlaceholder)
[DOTNET] at FFImageLoading.Work.ImageLoaderTask3.<GenerateImageAsync>d__87[[Android.Graphics.Bitmap, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065],[FFImageLoading.Drawables.SelfDisposingBitmapDrawable, FFImageLoading.Maui, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[Android.Widget.ImageView, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].MoveNext() [DOTNET] at FFImageLoading.Work.ImageLoaderTask3.d__92[[Android.Graphics.Bitmap, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065],[FFImageLoading.Drawables.SelfDisposingBitmapDrawable, FFImageLoading.Maui, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[Android.Widget.ImageView, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].MoveNext()
[DOTNET] at FFImageLoading.Work.ImageLoaderTask`3.d__92[[Android.Graphics.Bitmap, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065],[FFImageLoading.Drawables.SelfDisposingBitmapDrawable, FFImageLoading.Maui, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[Android.Widget.ImageView, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].MoveNext()
[EGL_emulation] app_time_stats: avg=192417.45ms min=27.43ms max=384807.44ms count=2

@microspaze
Copy link
Owner

For svg images, you should:
1.Use SvgCachedImage control or CachedImage control with SvgImageSourceConverter to render.
2.Specify the render size of the image.

Just like :


 <ContentPage.Resources>
        <ResourceDictionary>
            <ffimageloading:SvgImageSourceConverter x:Key="SvgImageSourceConverter"></ffimageloading:SvgImageSourceConverter>
        </ResourceDictionary>
    </ContentPage.Resources>

    <ContentPage.Content>
        <ScrollView>
            <VerticalStackLayout>
                <Label Text="svg001raw.svg From Resource/Raw folder" />
                <ffimageloading:SvgCachedImage WidthRequest="200" HeightRequest="200"
                                    Source="svg001raw.svg"/>

                <Label Text="svg001.svg From Web" />
                <ffimageloading:SvgCachedImage WidthRequest="200" HeightRequest="200" 
                                    HorizontalOptions="Center" VerticalOptions="Center"
                                    Aspect="AspectFit"
                                    Source = "https://muslimpillarsapp.blob.core.windows.net/reciters-photo/001.svg">
                </ffimageloading:SvgCachedImage>

                <Label Text="svg001.svg Binding" />
                <ffimageloading:CachedImage WidthRequest="200" HeightRequest="200"
                    Source="{Binding Source, Converter={StaticResource SvgImageSourceConverter}}">
                </ffimageloading:CachedImage>

            </VerticalStackLayout>
        </ScrollView>
    </ContentPage.Content>

@arahmancsd
Copy link
Author

@microspaze thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants