Skip to content

Conversation

@ananasmoe
Copy link
Member

image

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

@THEGOLDENPRO
Copy link
Member

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.

@ananasmoe
Copy link
Member Author

I think zed uses the cargo format command when saving and tiff images are just large by default.

@THEGOLDENPRO
Copy link
Member

I'll try and fix the formatting then I'll look into why images are displaying like so.

@THEGOLDENPRO
Copy link
Member

tiff images are just large by default.

Alright no worries then. I forgot we were dealing with more of a raw image format.

@THEGOLDENPRO
Copy link
Member

THEGOLDENPRO commented Dec 25, 2025

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:

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

@THEGOLDENPRO THEGOLDENPRO linked an issue Dec 25, 2025 that may be closed by this pull request
Base automatically changed from refactor!/roseate-core to main December 28, 2025 23:08
@ananasmoe
Copy link
Member Author

image

now this is formatting gore

@THEGOLDENPRO
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for TIFF image format.

3 participants