-
Notifications
You must be signed in to change notification settings - Fork 2
feat: tiff support #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Nice but I really hate formaters, especially when I haven't configured it, this one has gone and reformatted everything I've specifically formated that way on purpose and there's so many unnecessary changes from it's shadowing the actual diffs I need to look at. The only formatting I don't mind from all of this is the use statements. Sorry but I cannot except this as is with the formatting. What formatter did you use? I'm going to try and see if I can set a config to disable most of it for future contributors. Anyways the incorrect display of the tiff image, I'll look into that. Looks like one of the RGB channels are mixed up or something. Also, don't upload really big test files to the repo. This one is 11mb, I've been keeping the test images small so the repo doesn't bloat up. |
|
I think zed uses the cargo format command when saving and tiff images are just large by default. |
|
I'll try and fix the formatting then I'll look into why images are displaying like so. |
Alright no worries then. I forgot we were dealing with more of a raw image format. |
|
Okay I think I found the core issue. The issue actually is to do with the fact that this is the first 16 bit image I've tested on Roseate, so thanks. Egui panics when we upload the image as they have a line to assert when the length of the u8 array is greater than what they calculated it should be via the image resolution and colour type (RGBA = 4): pub fn from_rgba_unmultiplied(size: [usize; 2], rgba: &[u8]) -> Self {
assert_eq!(
size[0] * size[1] * 4,
rgba.len(),
"size: {:?}, rgba.len(): {}",
size,
rgba.len()
);
# ...
}...but this is exactly the type of bug I wanted to run into when I said "I would like to start testing" in #97 See works with an 8 bit image:
Now I need to understand this further and try and figure out a solution. Also there's some nice tif example images on Standford University's website out of all websites lmao: https://web.stanford.edu/class/ee398a/samples.htm |
|
I didn't mean to remove the formatting, a commit in main just had more up to date deps for this source file. I actually prefer the multi line use statements, it's way better for merging git changes and readability. |



for whatever reason the image turns out like this, i will check out this later. maybe check if you can see what's wrong.
my rust formatter has formatted your code btw ^^, time to use one big dawg