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

geotiffimage: stop mentioning that readRGB() forces interleaving #426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sguimmara
Copy link
Contributor

@sguimmara sguimmara commented Mar 26, 2024

This PR fixes documentation that mention that readRGB() always interleave pixels (it does not if interleave: false in the options).

There is even an existing test case that proves it:

  it('should read into non-interleaved arrays if requested', async () => {
    const tiff = await GeoTIFF.fromSource(createSource('rgb.tiff'));
    const image = await tiff.getImage();
    const data = await image.readRGB({ ...options, interleave: false });
    expect(data).to.have.lengthOf(3);
    expect(data[0]).to.have.lengthOf(50 * 50);
    expect(data[1]).to.have.lengthOf(50 * 50);
    expect(data[2]).to.have.lengthOf(50 * 50);
  });

fixes #424

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

Successfully merging this pull request may close these issues.

readRGB() does not always return an interleaved array
1 participant