Skip to content

Make "arrayjoin: not one band or 4 bands" error report more helpful #202

Open
@int-ua

Description

@int-ua

Is your feature request related to a problem? Please describe.
When getting this error on a script someone else wrote it's not obvious what's happening and what the problem is without searching an explanation on the web.

Describe the solution you'd like
Adding something like

You may need to convert all images to the same color space.
pyvips.Image.colourspace function may help with that.

Additional context
Trying to just generate a text on a transparent background is unnecessarily complex and lacks an example that's easy to find.

Code fix example

                vips_image = Vips.Image.pngload(png_pathname)
                if vips_image.interpretation != 'srgb':
                    vips_image = vips_image.colourspace('srgb')

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