Skip to content

Multiple bugs in Microsoft.Maui.Graphics.IImage platform specific implementations #21886

@Larhei

Description

@Larhei

Description

While Prototyping some ImageZoom I was playing around with IImage.Resize and IImage.Downsize on iOS and Android and Windows.

  1. Call to Resize
    Resize(10, 10, ResizeMode.Fit,true)
  • On Android it returns a Disposed image and original is not disposed.
  • On iOS it gives an image but original is not disposed
  • On Windows it throws not implemented exception
  1. image.Downsize(10, 10,true)
  • On Android it gives me an 10 by 10 px image. So it is not keeping the aspect like the call to image.Downsize(10,true)` original image gets disposed
  • On iOS original image gets not disposed returned image is 10 by 7 so it keeps the Aspect somehow. But from my own calculations it should be 10 by 6,15 so here could be a rounding issue?
  • On Windows it throws not implemented exception

So docs are wrong and code is just not working.

Steps to Reproduce

  1. Checkout repro
  2. Click the Buttons
  3. Read the Popups if it does not crash

Link to public reproduction project repository

https://github.com/Larhei/Maui-Issues/tree/main/PlatformImage

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows

Affected platform versions

No response

Did you find any workaround?

No... Will be a happy coding day for me to implement it by myself.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions