Color deviation by 'export-profile' option in thumbnail_image

Aberta
#257 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
php

Direção de pesquisa

Comece executando o snippet PHP fornecido com thumbnail_image() e pngsave_buffer() nos ambientes libvips 8.10.5 e 8.16.0 relatados, comparando os caminhos export-profile e padrão. Rastreie o ponto de entrada thumbnail_image e o tratamento da interpretação da imagem. A tarefa estará concluída quando a causa dependente da versão for identificada e o issue tiver uma resolução documentada.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

I know that it is advised to use thumbnail() rather than thumbnail_image(), but in my case I am dependent on editing an object and have no direct path name as input.

I've noticed a behavior that I can't explain. When I run the following code, I observe that the blue color in the output shifts. This only happens when I set the export-profile option. If I leave it off the colors are fine.

$image = \Jcupitt\Vips\Image::newFromFile('blocks.png');
$image = $image->thumbnail_image(100, [
        'export-profile' => $image->interpretation,
]);
$encoded = $image->pngsave_buffer();

What surprises me is that the option should not actually change anything, as the original interpretation in the image is already srgb. And if I leave out the export-profile option, it should also be encoded also to srgb by default.

Nevertheless, it results in the color shift. What could be the reason for this?

EDIT: The script does not produce a color shift under macOS and libvips-8.16.0 but does under Debian 11 and libvips42 (8.10.5-2). Could this version difference be the reason?

Input Image

blocks

Result Image

out

Linguagem predominante
PHP
Estrelas
726
Forks
35
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de libvips/php-vips

Todas as issues de libvips/php-vips

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.