VDJ

Levelling destroys image

Recommended Posts

I would like to use Paint.NET as an alternative editor for scanned documents. These documents are actually plans, both architectural and topographic. Especially the topographic plans can be 1. very old and 2. very big. A typical topo. plan is 30 cm high and between 3m and 15m. (yes, meters) long. It generates scanfiles of several megabytes, up to 500 MB when scanned to TIF. By default, all scans are done on 999 mm wide. (almost the complete width of the scanner) The scan has to be rotated (+/-90°), cropped, and leveled with the  'Layers>rotate' function, after wich it can be cleaned up with the 'Adjustments>Curves' tool.

This works fine on smaller scans.

But I have now a scan of + 4m (so,  actually not that big) where it goes wrong. Whatever sequence of the above actions I take, also when I save intermediate steps, when I try to level the image, using the 'Layers>Rotate' function, it destroys the image and leaves me with nothing than transparent pixels. Destruction takes place from the moment the windows appears.

What do I do? Can this be overcome?

Paint 4.0.21 - Win 10 Pro 1607 - 8 GB RAM - the cropped image is 4600x49000 point, about.

Share this post


Link to post
Share on other sites

@VDJ Welcome to the forum :)

 

I'm wondering if this Plugin may be of use, instead of the Layers/Rotate:

 

 

 

 

Share this post


Link to post
Share on other sites

Can you elaborate on what you mean by "destroys" ? 

 

Screenshots would help, and maybe even a video. If you could provide one of these images that cause this to happen, that would really help too.

Share this post


Link to post
Share on other sites

"destroys" is explained in my OP: " it destroys the image and leaves me with nothing than transparent pixels". In other words, the whole image is transformed into one sheet/layer of transparent pixels. Saving it does not resurrect the image. Paint.NET doesn't crash, but the image is rendered useless, without information, like a clear sheet of glass.

 

Screendump: ok. There's just one: at the moment that I open the Rotate/Zoom, the image turns transparent. If at that moment, I press cancel, it returns. But the whole point is to rotate the image slightly.

 

Attaching the file is a bit difficult, 'cause it is 204 MB in TIF, and 7,6 MB as JPeG, even when 'cleaned up (and not levelled) it's still 5,9 MB. I'm open to suggestions.

Capture1.PNG

Share this post


Link to post
Share on other sites

If I create a 49000x4600 image and just open Rotate / Zoom, same thing happens, everything is transparent.

Playing around with roll or pan, nothing seems to happen.

Okay… it seems to happen at a specific resolution? Works fine at 46092, broken at 46093. @Rick Brewster

Edit: It also has something to do with vertical resolution.

46093x4787 works just fine but 46093x4788 doesn't.

Edited by Zagna
  • Upvote 2

Share this post


Link to post
Share on other sites

Glad you could reproduce the problem. ?

Points to a memory problem? Because Paint.NET wants to contain the whole image in-memory? ?

That's bad news, then. Because we have topographic plans that are longer than 10 m. ?

 

Share this post


Link to post
Share on other sites
1 minute ago, VDJ said:

Glad you could reproduce the problem. ?

Points to a memory problem? Because Paint.NET wants to contain the whole image in-memory? ?

That's bad news, then. Because we have topographic plans that are longer than 10 m. ?

 

Not a memory problem, just a good old bug, especially since it triggers with a +1 pixel change.

paint.net has had a bunch of bugs for really large dimensions, in the 30000+ variety once in a while and Rick fixes them as they come up.

Share this post


Link to post
Share on other sites

Yeah Paint.NET falls apart at those image sizes. I do try to fix things as they come up, but it's not the safest space to play in.

 

I'll file a bug and see if this can get a fix for the next release. Thanks for the bug report!

 

And thanks for the detailed repro information, @Zagna:)

Share this post


Link to post
Share on other sites

Thank you for going further with this.

 

FYI 

I have identified our largest scan. It's 272145 x 4639, a monochrome scan @ 400 DPI of a plan over 17 meters long.

?

Share this post


Link to post
Share on other sites

Paint.NET won't work very well, or at all, with an image that is 272K pixels wide. It's really limited to 65,535 pixels in either dimension.

Share this post


Link to post
Share on other sites

So, dimensions are apparently 16-bit restricted? Am I correct? That means maximum dimension are 65,335 x 65335 pixels.

Edited by Reptillian

Share this post


Link to post
Share on other sites

I'd imagine. It probably falls out of scope once you're working with an image larger than 65k pixels in any direction; I don't know what utility you might acquire from such a large image.

Share this post


Link to post
Share on other sites

Hmm, even when the bug is corrected, at 65535 pixels, at 300 dpi, that's:  65535 * 25,4/ 300 = 5548 mm or a bit over 5,5 meters. ☹️

 

Share this post


Link to post
Share on other sites

You can't create a new image that is larger than 65,535 pixels in either dimension.


You can load images of that size but things won't work in a bunch of situations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now