Posts: 1,341
Threads: 99
Joined: Jul 2013
Reputation:
6
I think the main problem is going to be that "that" file is probably quite representative of a lot of the books that are out there. Many of the real books were digitised at around the same time and presumably with much the same versions of Acrobat.
Still, never mind - as you say, the knowledge should come in useful at some time in the future.
Posts: 119
Threads: 29
Joined: Sep 2012
Reputation:
0
Sorry to resurrect this thread haha...but I am using this app, and for the most part it seems good. However from time to time it will display negative images of pages within the same songbook?
Is there a way to stop this?
Thanks
Posts: 15
Threads: 2
Joined: Sep 2012
Reputation:
1
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.