topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:09 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: N.A.N.Y 2013 Submission - BookCrop  (Read 38052 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
N.A.N.Y 2013 Submission - BookCrop
« on: December 08, 2012, 12:51 PM »
NANY 2013 Entry Information

Application Name BookCrop
Short Description BookCrop quickly batch crops many jpeg photos of book pages
Supported OSes tested in Win7
Web Page http://nod5.dcmembers.com/bookcrop.html
Download Link http://nod5.dcmember...wnloads/bookcrop.zip
Author nod5
Description1. Drag and drop a folder of jpeg or tif images.
2. BookCrop overlays them all into one preview.
3. Draw a rectangle and click "crop" to lossless crop all images.
(4. or Ctrl+draw another rectangle to the right of the first to crop split each image to two files)
Use BookCrop on folders with right and left pages before ScanTailor when book scanning.
BookCrop is like Briss but for jpeg files.
See the application web page for more details and usage tips.
Screenshotsbookcrop1.pngN.A.N.Y 2013 Submission - BookCropbookcrop2[1].pngN.A.N.Y 2013 Submission - BookCropbookcrop5.pngN.A.N.Y 2013 Submission - BookCrop
InstallationUnzip BookCrop.
Download and install the latest GraphicsMagick (Q8 version is faster) to any folder, BookCrop automatically finds it.
Download libjpeg-turbo-1.3.0-gcc.exe (for 64bit get gcc64.exe) or newer and unzip the exe (with 7-zip) and browse to the \bin subfolder and copy jpegtran.exe and libjpeg-62.dll and place next to BookCrop.exe
Run BookCrop.exe
UninstallationDelete the BookCrop application folder.
Help me out with this:
- test it in Win xp, Vista and Win7 32bit
- let me know if you find any bugs

added updates:
- preview height now adapts to screen height.
- new option: crop to subfolder (keep originals).

edit 2013-06-22: updated the instruction above to fit new files and features
edit 2014-11-14: updated version with split batch job (left right) and rotation
« Last Edit: November 14, 2014, 01:35 PM by Nod5 »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #1 on: December 09, 2012, 09:26 AM »
Haven't tested it, but great idea!

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #2 on: December 09, 2012, 10:36 AM »
What components of GM are required and can I just place them in the bookcrop folder?

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #3 on: December 09, 2012, 01:50 PM »
Phil, use the installer and install to any folder you want. BookCrop then reads the GraphicsMagick binary path from the registry. But jpegtran.exe on the other hand must be manually placed in the BookCrop folder. I will clarify that in the OP.

akinomento

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #4 on: December 21, 2012, 12:37 PM »
What is the quality loss in the jpgs after the crop?

Also, it says:

GraphicsMagick not found. Install it and try again

But there is no way to install this, it just runs from the exe, am I wrong?

I am in Win 7 x64

Thanks
« Last Edit: December 21, 2012, 12:58 PM by akinomento »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #5 on: December 22, 2012, 05:43 AM »
Hi akinomento,

For BookCrop to work you also need to install GraphicsMagick (using the installer, install it to whatever folder you want) and to download and place Jpegtran.exe (no installation needed) in the same folder as BookCrop. See under "installation" in the original post above for links or click the "?" in the lower corner inside BookCrop and you'll find the links there too.

There is no quality loss. Jpegtran does lossless jpg cropping.

akinomento

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #6 on: December 22, 2012, 09:26 AM »
Sorry, I thought it was only the bookcrop.exe (my bad)
Lossless, wow, I would have to read more into jpegtran... My understanding was that once you modify a jpeg, you were loosing quality
All working perfect, except the side panel (the one with the threshold). It always stays on top, like 'pinned'
Also it would be perfect if you could 'readjust' the rectangle after drawing it

Thanks again  :Thmbsup:

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #7 on: December 22, 2012, 11:45 AM »
I'm glad you have use for it!  :)

You can uncheck "show on startup" in side panel settings. Once the side panel is open you can close it by clicking the "?" again or pressing "esc" or "tab".

Readjusting as in drag and drop of a drawn rectangle doesn't work. But you can simply draw a new rectangle and the old one is replaced.

akinomento

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #8 on: December 22, 2012, 01:50 PM »
Yes, I will have a use for it.  :Thmbsup:
I'm planning on cropping the jpgs before feeding them to Scan Tailor. I will crop them to get rid of headers and footers and the opposite page.

I don't have a DIY hackerspace scanner (I only use one camera and a crappy cardboard 'thingy')
But for those with one, I think they will have to draw bigger rectangles (in height), because the 'text zone' is going to be moving down as they advance in the scanning process till getting to the middle of the book (the thicker the book, the more the text is going to move)
« Last Edit: December 22, 2012, 02:02 PM by akinomento »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #9 on: December 23, 2012, 04:12 AM »
If the book tray of the scanner is constructed to automatically adjust sideways (drawer slides/ball bearings) then that won't be a big problem I think.

akinomento

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #10 on: December 23, 2012, 09:20 AM »
Oh, I see now, I had the wrong theory then that it was going to move...
Anyway, I have tested again bookcrop I found it really fast with GraphicsMagick-1.3.17-Q8, and experimented with the threshold, with a value of 40

akinomento

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #11 on: January 02, 2013, 12:04 PM »
If  I drag and drop a single jpeg, it doesn't let me push the Crop button.
Is it normal?

Thanks

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #12 on: January 03, 2013, 02:41 AM »
Yes, single image mode is only for quick pretuning of the threshold before dropping a folder with many images. BookCrop is made only to do batch cropping as quickly and simply as possible. Good and fast single image cropping tools already exist in most image viewers/editors.

akinomento

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #13 on: May 27, 2013, 09:56 AM »
Sorry to bother you again.
I have recently read in some forums that the lossless cropping of a jpeg file is only possible if you crop it respecting some kind of proportion in the cropping rectangle. I found that in your program you can freely select the area to crop, exactly where you want.
Thanks

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #14 on: May 28, 2013, 04:02 AM »
Hi. My impression was that jpegtran does lossless crop regardless of what dimensions the user inputs by automatically adjusting those inputs a little if needed. But I'm frankly not entirely sure since the information on http://jpegclub.org/jpegtran/ is not so clear.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #15 on: June 22, 2013, 09:39 AM »
BookCrop has been updated. Changelog for v130622:
.tif input now also works
faster preview thanks to -size command in graphicsmagick
faster crop thanks to jpegtran from libjpeg-turbo (but slower jpegclub jpegtran still works)
fix: find GraphicsMagick path via registry 64bit Windows now works
fix: removed term "lossless" from info

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #16 on: August 23, 2013, 07:42 AM »
Used this for a small group of images (20): hand held camera, lots of notes in the margin. Not really what it was designed for I think, but it worked quite well. Thanks!
(Win7 64bit)
Tom

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #17 on: August 25, 2013, 03:32 AM »
I'm glad it's of use. Crop 'til you drop! :D

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #18 on: November 14, 2014, 01:35 PM »
2014-11-14: updated version with split batch job (left right) and rotation

hatatat

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #19 on: April 09, 2016, 12:16 AM »
Hi,

I tried to use the software but without success...

Observation: after installing everything, executing BookCrop and droping a folder to the window:

1. a message "creating overlay" appears for some seconds
2. a vertical line appears that divides my screen. Pressing the R or L key toggles the view to a small horizontal window with a non clickable area titled 'crop'. Nothing else can be done apart from closing the application.

I use Windows Home Premium.

Please find attached the horziontal window.

Thanks in advance.

hatatat

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #20 on: April 10, 2016, 10:45 AM »
After doing this in the ahk file, it seems to work (I have a German computer)

Code: Autohotkey [Select]
  1. Loop 283
  2.    {
  3. ;    if (objFolder.GetDetailsOf(objFolder.Items, A_Index) = "Width")
  4.     if (objFolder.GetDetailsOf(objFolder.Items, A_Index) = "Breite")
  5.        imgw := objFolder.GetDetailsOf(objFolderItem, A_Index)
  6. ;    if (objFolder.GetDetailsOf(objFolder.Items, A_Index) = "Height")
  7.     if (objFolder.GetDetailsOf(objFolder.Items, A_Index) = "Höhe")
  8.        imgh := objFolder.GetDetailsOf(objFolderItem, A_Index)
  9.    }

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #21 on: April 10, 2016, 11:58 AM »
Nice! thanks for sharing the fix!

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #22 on: April 13, 2016, 10:44 AM »
The new version 160412 fixes the non-english language problem.

jedidiah123

  • Participant
  • Joined in 2017
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #23 on: February 22, 2017, 05:18 AM »
Anybody get this to work in windows 10?
thanks

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: N.A.N.Y 2013 Submission - BookCrop
« Reply #24 on: February 22, 2017, 06:29 AM »
Anybody get this to work in windows 10?
thanks

that's weird!
I just tried this yesterday again in Windows 7, but it didnt work...
Tom