processing / processing/processing4
.tga PImage flips y axis after save() and load()
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 494
- Fork
- 183
- Merge trung bình
- 4 giờ 39 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với các đường dẫn của PImage.save() và loadImage() liên quan đến việc xử lý .tga, sau đó chạy bản tái hiện 5×5 được cung cấp trên Processing 4.3. Theo dõi xem việc lưu hoặc tải có thay đổi thứ tự pixel theo chiều dọc hay không; hoàn tất khi pixel màu đỏ vẫn nằm ở góc trên bên trái sau khi lưu và tải TGA.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- computer-graphics
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100