• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cropping
#1
Maybe the hot, record breaking temperatures are slowing down my brain cells but I seem to remember that it was possible to import/export page croppings in the csv.

Am I mistaking?
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#2
I only know of the checkbox "Automatically crop pages" in the import dialog.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#3
Yes, but that doesn't help when you have pages with more than one song, and you want to crop out each of the songs individually.

I've done this with a couple of song collection PDFs and it would be nice to share this information.

Mike, would it be feasible to add cropping info to the csv import and export? E.g. in the form widthxheight+left+top (one of the forms often used in image tools) to avoid having to specify multiple items?
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#4
Sure, I can add support for that. I'll have to do some basic validation on the cropping coordinates to ensure out-of-range values were not specified (which means loading the document and checking the page sizes), but hopefully this shouldn't slow down the import very much. The automatic cropping actually has to render the page to figure out the cropping coordinates, so it will be much faster than that.

Mike
Reply
#5
Nice.

For cropping validation you do not need to render the page, you can just use the page MediaBox or CropBox.
You realize that crops go with pages? So the page range for a song that starts about halfway page 15 (pagesize 599x830) and extends to halfway page 17 would become something similar to "15@599x420+0+410,16,17@599x410+0+420".

A abbreviated form could be "15@+410,16,17@-420" (only vertical crop).

Just some ideas...
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#6
Exactly - that's what I was saying. I do not need to render the page for this new capability, so just loading the page to read the mediabox or cropbox should be plenty fast. I was comparing that to automatic cropping where I do need to render the page to analyze the pixels to figure out how much of the page can be cropped without eliminating content.

So you want to include the cropping as part of the page order? I had assumed it would be a different column, but I guess I can see that is makes sense to include it with the page order. I'll just have to write some new parsing code to replace the existing page order parsing.

Thanks,
Mike
Reply




Users browsing this thread:
1 Guest(s)


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