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

More usability issues #50

Open
p0nce opened this issue Jun 8, 2023 · 4 comments
Open

More usability issues #50

p0nce opened this issue Jun 8, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@p0nce
Copy link
Collaborator

p0nce commented Jun 8, 2023

Emulate the imageformats functions as public API.

Main problem is just that I could not be ensured that the order is what I needed
so I needed to add a lot more code to make sure, eg. that all data was interleaved RGB(A)
maybe a toInterleaved8 and toInterleaved16 function pair that does the heavy lifting would make it easier...
together with a format parameter to specify whether conversion to RGB/RGBA should happen

you get:
channel count
bits per channel (8 or 16)
functions for auto-converting to the format you need if need be
Of course, for GPU-side compressed formats I'd rather need the raw binary blob together with width and height

imgformats makes it really easy to get the pixels out

All the extra flags you need to pass does make the API slightly more hard to wrap ones head around I'll be honest

@p0nce
Copy link
Collaborator Author

p0nce commented Jun 8, 2023

  • channel count function
  • bpc function
  • easy load function just like in imgfmt
  • Advertise more the functions convertTo people don't realize it exist

@p0nce p0nce added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 8, 2023
@p0nce
Copy link
Collaborator Author

p0nce commented Dec 7, 2023

comment from Dplug

// Note about gamut: would be way easier to use if there was a way to copy a single channel from another image,
// to fill a single channel with 255, to resize from an image to another, to easily crop a rectangle.

@p0nce
Copy link
Collaborator Author

p0nce commented Oct 9, 2024

  • easy "toRef" function, to initialize an image as a reference to another. For now, have to use image.layer(0)

@p0nce
Copy link
Collaborator Author

p0nce commented Oct 9, 2024

  • downallocation should not reallocate down until shrinkToFit is called? Else, it makes reusing a buffer with various size a realtime hazard, much like realloc vs Vec => rare case that would necessitate a .reserve call instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant