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

Layered images #56

Closed
18 tasks done
p0nce opened this issue Oct 14, 2023 · 1 comment
Closed
18 tasks done

Layered images #56

p0nce opened this issue Oct 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@p0nce
Copy link
Collaborator

p0nce commented Oct 14, 2023

  • Every image has a layer count (typically = 1). Uninitialized images have layer count = 0.
  • layers() call return correct value.
  • int layerOffsetInBytes() pure const
  • Images with zero layer are authorized (much like images with width == 0 and height == 0) are legal
  • actually allocate images with several layers (vertical borders for each layer, but also horizontal).
  • LAYOUT_GAPLESS specify that layers are sticked together? or no difference.
  • possibility to convert scanlines across all layers, convertTo works
  • API for getting scanline of particular layer
  • API for getting individual layer subimage
  • API for getting range of layer subimage
  • support createViewFromData with layers
  • support createWithNoData withlayers
  • convertTo should work
  • flipVertical, flipHorizontal
  • clone
  • copyPixels
  • usability: it must be width, then height, then layerCount
  • documentation of all that
p0nce pushed a commit that referenced this issue Oct 15, 2023
Image is now an array of 2D images of same size and type.
New Image calls:
  - image.layers()   0    => no layers, like 0-width and 0-height
                     1    => single layer (normal image)
                     >=2  => multiple layers (animated image)
  - hasZerolayer()
  - image.layerOffsetInBytes(), the byte offset between layers
  - image.hasZeroLayer() or image.hasOneLayer() or image.hasMultipleLayers() => one of those is true if the image is valid.
  - there is a GAMUT_MAX_IMAGE_LAYERS

Still a lot to do in Issue #56, but this shoud be 100% backwards compatible.
The goal is GIF export for now.
@p0nce p0nce added the enhancement New feature or request label Oct 15, 2023
@p0nce
Copy link
Collaborator Author

p0nce commented Oct 18, 2023

Basically work, now a codec ought to use that.

@p0nce p0nce closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant