• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Real Book Extractor
#19
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.
Reply


Messages In This Thread
Real Book Extractor - by trevorprinn - 11-11-2014, 10:12 PM
RE: Real Book Extractor - by GraemeJ - 11-12-2014, 01:27 AM
RE: Real Book Extractor - by trevorprinn - 11-12-2014, 01:53 AM
RE: Real Book Extractor - by trevorprinn - 11-12-2014, 03:09 AM
RE: Real Book Extractor - by GraemeJ - 11-12-2014, 03:34 AM
RE: Real Book Extractor - by trevorprinn - 11-12-2014, 05:06 AM
RE: Real Book Extractor - by GraemeJ - 11-12-2014, 05:35 AM
RE: Real Book Extractor - by popoff - 11-12-2014, 06:05 AM
RE: Real Book Extractor - by GraemeJ - 11-12-2014, 06:49 AM
RE: Real Book Extractor - by popoff - 11-12-2014, 07:02 AM
RE: Real Book Extractor - by trevorprinn - 11-12-2014, 10:52 PM
RE: Real Book Extractor - by GraemeJ - 11-12-2014, 11:15 PM
RE: Real Book Extractor - by trevorprinn - 11-12-2014, 11:47 PM
RE: Real Book Extractor - by trevorprinn - 11-13-2014, 05:50 AM
RE: Real Book Extractor - by GraemeJ - 11-13-2014, 07:12 AM
RE: Real Book Extractor - by trevorprinn - 11-13-2014, 09:03 AM
RE: Real Book Extractor - by GraemeJ - 11-13-2014, 10:37 AM
RE: Real Book Extractor - by pax_eterna - 11-30-2016, 03:32 AM
RE: Real Book Extractor - by trevorprinn - 11-30-2016, 04:36 AM
RE: Real Book Extractor - by pax_eterna - 11-30-2016, 01:23 PM
RE: Real Book Extractor - by trevorprinn - 12-01-2016, 01:40 AM
RE: Real Book Extractor - by gajatko - 11-14-2019, 08:45 AM
RE: Real Book Extractor - by itsme - 11-14-2019, 05:45 PM



Users browsing this thread:
6 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.