Skip to content

Document error about get_n_pages #565

@NewUserHa

Description

@NewUserHa

https://libvips.github.io/pyvips/vimage.html#pyvips.Image.get_n_pages

get_n_pages actually returns number of pages of the file, and it's not the page number of pages in the file the image was loaded.

Also the libvips document says:
https://www.libvips.org/API/8.17/method.Image.get_n_pages.html

[−]
Description
[src]
Fetch and sanity-check VIPS_META_N_PAGES. Default to 1 if not present or crazy.

This is the number of pages in the image file, not the number of pages that have been loaded into image.

[−]
Return value
Type: int

The number of pages in the image file.

The error should be fixed.
Should create a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions