processing / processing/processing4
.tga PImage flips y axis after save() and load()
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 494
- Forks
- 183
- Merge medio
- 4 h 39 min
- PR fusionados (30 d)
- 3
Descripción
Created by: Sebastian5
Description
ONLY when pixels are saved ( PImage.save() ) as .tga and loaded again ( loadImage() ) they are fliped on the y axis.
Expected Behavior
That the image doesnt flip.
The demo code should show the red dot in the top left corner, not the bottom left.
Current Behavior
It is unclear whether the PImage.save() or loadImage() function is the root of the bug.
The Problem does NOT occur when:
If you save and image as .tga and open it with Paint.net: looks correct in Paint.net, not flipped
If you load an .tga created from Paint.net: looks correct in Processing, not flipped
But for .tga images that were PImage.save() and loadImage(). It flipps the pixels. It is very strange
Steps to Reproduce
PImage img1 = createImage(5, 5, RGB);
img1.pixels[0] = color(255,0,0); // left top corner must be red
img1.updatePixels();
img1.save("img.tga");
PImage img2 = loadImage("img.tga"); // comment out after using Paint.net to re-save image non corrupt
image(img2,0,0, width, height);
Your Environment
- Processing version: 4.3
- Operating System and OS version: Windows 10 Pro 22H2
- Other information: AMD GPU Andrenail 23.12.1, Intel CPU
Possible Causes / Solutions
Maybe there is file desciptor flag to flip an image in the y axis.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con las rutas de PImage.save() y loadImage() implicadas en el procesamiento de .tga y, después, ejecuta la reproducción proporcionada de 5×5 en Processing 4.3. Rastrea si guardar o cargar cambia el orden vertical de los píxeles; se considera terminado cuando el píxel rojo permanece en la esquina superior izquierda después de guardar y cargar la TGA.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- computer-graphics
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100