question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IImage.AsBytes() takes float quality 0..1 but complains about quality not being 0..100 when 50 is entered

See original GitHub issue

Description

Probably just the exception message is wrong.

When calling image.AsBytes for a jpg image with quality 50, the following code is executed:

image

but it outputs:

**Java.Lang.IllegalArgumentException:** 'quality must be 0..100'

I don’t know if Windows is affected because Windows cannot load IImage at all currently.

Steps to Reproduce

export IImage on Android

Version with bug

Release Candidate 2 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11 (API 30)

Did you find any workaround?

use quality / 100f -> 0…1

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Christeradcommented, Mar 14, 2023

@drasticactions Thank you. Could you please also move my 2 other issues from the Maui.Graphics repo to MAUI? It’s these two: dotnet/maui#13902 dotnet/Microsoft.Maui.Graphics#422 And also this issue which is very much related to my issue 423: dotnet/Microsoft.Maui.Graphics#450

https://github.com/dotnet/maui/issues/13902 https://github.com/dotnet/Microsoft.Maui.Graphics/issues/422 These problem isnt being solved ? any updates ?

0reactions
msftbot[bot]commented, Feb 8, 2023

We’ve moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quality of a saved JPG in C# - Stack Overflow
I made a small C# app to create an image in .jpg format. pictureBox.Image.Save(name,ImageFormat.Jpeg);. The image is succesfully created. I ...
Read more >
Could not allocate tensor with 377487360 bytes. There is ...
Stable diffusion crash, after generating some pixel and appear error : Could not allocate tensor with 377487360 bytes. There is not enough GPU ......
Read more >
Performance Improvements in .NET 7
NET 7 is fast. Really fast. This post deep-dives into hundreds of performance improvements that contributed to that reality.
Read more >
PyMuPDF Documentation
PyMuPDF is an enhanced Python binding for MuPDF – a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which is maintained and ......
Read more >
Jython Scripting Examples
But it is currently beta quality, and the Python language does not work properly due to bugs. Once this issue is fixed, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found