11-30-2016, 01:23 PM
(11-30-2016, 04:36 AM)trevorprinn Wrote: I know what you mean the pages coming out negative. The problem is that a lot of the images that are extracted don't have any palette information in them. They should have a palette saying whether 1 is a black or a white pixel. Because of that, when I first wrote it the pages from some pdfs came out completely reversed, so I wrote in a little kludge to cope with it. I assume that the corners of the page should be white, so I look at the 50x50 square in the top left hand corner, and count how many white pixels there are. If there's more white than black I assume it's OK. If not, I check the top right hand 50x50 square as well (because some of the scanned pages may be a bit torn). If I still find more black than white, I reverse the palette. This worked on everything I checked it on, but there's no guarantee that it will always work. If the pdf was made from scans that have a black border this could produce a negative image, for example.
I suppose the nearest I can get to fixing it easily would be to add a button to let you switch the palette around.
While I'm at it, I'll fix the extract so that it runs on a background thread and can be cancelled. My laziness in not bothering to do that originally annoys me.
I don't know when I'll get it done. Probably some time this week.
Thanks Trevor - whenever you feel like it/can do it is fine by me. It is an EXCELLENT app many thx.