Briss-2.0 icon indicating copy to clipboard operation
Briss-2.0 copied to clipboard

Add kindle screen size support

Open mbaeuerle opened this issue 9 years ago • 4 comments

Add support for cropping to kindle/ebook reader screen sizes.

mbaeuerle avatar Jan 17 '15 18:01 mbaeuerle

I guess that is kind of similiar to issue 32 on the original issue tracker, Save Crop rectangle setting and use it in command line, so I'm pasting that here as an alternative that is quite a bit more flexible:


Understand that from version 0.0.13 onward includes automatic cropping (crop rectangles will be predrawn or if you prefer the command line: "java -jar briss-0.0.13 -s INPUTFILE -d OUTPUTFILE... But the command line method do not allow us to specific the crop rectangle size. It will use the default cropping setting. Is there a manual setting we can set in current ver 0.9? If there a feature to saved the crop rectangle co-ordinate drawn in gui and save to a setting file, and this can be an input setting file used in the command line parameter. Even within the command line to add a parameter for the crop rectangle size will be good. example java -jar briss-0.9 -s in -d out -CropRect1 settingFile.txt. This feature will allow automation by command line.


Old comment

After looking at the code it seems that all that is needed is the parameters sent to MergedPanel in the GUI code. That is x,y, width and height.

Creating a patch that displays these values in the command line output or some kind of GUI switch to display it in the GUI seems trivial. I would not mind forking this project on GitHub and create this functionality. Would you (@laborg) accept a patch if I so did?

This is a basic functionality that should be useful for most. In my case, I often have collections of slides that I would like to read on my Kindle, but these needs to be cropped. They all have to same dimensions and layout, so a batch job would be very much suitable for this.


fatso83 avatar Jan 22 '20 15:01 fatso83

I don't understand completely what how this would be implemented. For example, I have a Kindle Paperwhite which has a screen of size 90 x 122 mm approximately. Would it be the case of cropping to a rectangle of this size? I've drawn a rectangle over a PDF document and 3/4 of the content is left out, so it's likely that I have understood it incorrectly what cropping to a screen reader size would be.

Or would it be equivalent cropping to an "optimal" rectangle proportional to the e-reader screen, in a way that the least amount of blank space is inside the crop while most of the content is inside it?

cleydyr avatar Mar 31 '22 18:03 cleydyr

Or would it be equivalent cropping to an "optimal" rectangle proportional to the e-reader screen, in a way that the least amount of blank space is inside the crop while most of the content is inside it?

That was my initial idea, yes. Currently not sure any more if that really makes sense though.

On Kindle what I want is that the width of the screen is used entirely. Now if I have a text that doesn't fit the ratio it's either too wide or too tall for the screen. Too wide wouldn't be an issue with this definition, it just would add white-space at the top and bottom.

So let's say the text is too tall. If I now crop away all white-space directly at the edge of the text and put it on the Kindle, it will add white-space automatically on the sides. Therefore cropping it in a correct ratio doesn't really make sense. Set the ratio correctly by leaving white-space at the sides or crop it away and let the Kindle handle it. Either way the result should be the same.

So if the text is too tall Briss cannot really help.

mbaeuerle avatar Mar 31 '22 18:03 mbaeuerle

What if Briss could transform a page that is too tall in many pages by juxtaposing "optimal" crops with the correct ratio?

cleydyr avatar Apr 02 '22 09:04 cleydyr