Bug 2421762
| Summary: | rubygem-image_processing: FTBFS in Fedora Rawhide | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mamoru TASAKA <mtasaka> | ||||
| Component: | vips | Assignee: | Adam Goode <adam> | ||||
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | adam, pvalena, redhat, vondruch | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | s390x | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | --- | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | Type: | Bug | |||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Mamoru TASAKA
2025-12-12 15:28:06 UTC
Created attachment 2119241 [details] Test input image From https://github.com/janko/image_processing/blob/8185ea61518d8cf477594505cd4b5ab478b28aea/test/fixtures/portrait.jpg ruby test case: https://github.com/janko/image_processing/blob/8185ea61518d8cf477594505cd4b5ab478b28aea/test/vips_test.rb#L177-L181 And in C: resize-to-limit-test.c ``` #include <stdlib.h> #include <stdio.h> #include <glib.h> #include <vips/vips.h> #include <sys/stat.h> #define MY_ASSERT(expr) \ do { \ if (!(expr)) { \ fprintf(stderr, "LINE[%d] : assertion \"" #expr "\" failed.\n", __LINE__); \ abort(); \ } \ } while(0) int main(void) { VipsImage *normal_image, *sharpened_image, *tmp_image; VipsImage *sharpen_mask_image; int ret; #define MASK_WIDTH (3) #define MASK_HEIGHT (3) #define MASK_DIMENSION (MASK_WIDTH * MASK_HEIGHT) static const int sharpen_array_2d_int[MASK_WIDTH][MASK_HEIGHT] = { {-1, -1, -1,}, {-1, 32, -1,}, {-1, -1, -1}, }; static double sharpen_array_1d_double[MASK_DIMENSION]; const char *input_path = "./portrait.jpg"; ret = vips_thumbnail( input_path, &normal_image, 400, "height", 400, "size", VIPS_SIZE_DOWN, NULL ); MY_ASSERT(!ret); ret = vips_thumbnail( input_path, &tmp_image, 400, "height", 400, "size", VIPS_SIZE_DOWN, NULL ); MY_ASSERT(!ret); for (int count = 0; count < MASK_DIMENSION; count++) { sharpen_array_1d_double[count] = (double)(((const int *)sharpen_array_2d_int)[count]); } sharpen_mask_image = vips_image_new_matrix_from_array( MASK_WIDTH, MASK_HEIGHT, sharpen_array_1d_double, MASK_DIMENSION ); MY_ASSERT(sharpen_mask_image); { GValue value = G_VALUE_INIT; g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, 24); vips_image_set(sharpen_mask_image, "scale", &value); g_value_unset(&value); } { GValue value = G_VALUE_INIT; g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, 0); vips_image_set(sharpen_mask_image, "offset", &value); g_value_unset(&value); } ret = vips_conv( tmp_image, &sharpened_image, sharpen_mask_image, "precision", VIPS_PRECISION_INTEGER, NULL ); MY_ASSERT(!ret); vips_image_write_to_file(normal_image, "normal.jpg", NULL); vips_image_write_to_file(sharpened_image, "sharpened.jpg", NULL); struct stat st_normal, st_sharpened; int size_normal, size_sharpened; stat("./normal.jpg", &st_normal); stat("./sharpened.jpg", &st_sharpened); size_normal = (int)st_normal.st_size; size_sharpened = (int)st_sharpened.st_size; /* On x86_64, this is "26544 28915" */ fprintf(stdout, "%d %d\n", size_normal, size_sharpened); MY_ASSERT(size_sharpened > size_normal); } ``` ``` $ gcc $(rpm --eval %optflags) $(pkg-config --cflags --libs vips glib-2.0) -o resize-to-limit-test{,.c} && ./resize-to-limit-test ``` reproduces this issue. So C only side reproduce this. Switching to vips. And in fact on s390x, the generated "normal.jpg" and "sharpened.jpg" are both "meaningless" images. Reported: https://github.com/libvips/libvips/issues/4815 Workaround seems to be setting "env VIPS_NOVECTOR=1" . |