Using percentage instead of pixels

Asked by ragtag

I know this is going kind of deep into the ACBF format, and may be too late already to change, but there is an issue with ACBF if you re-size the images used for the comic at a later point, as all the frame and speech bubble regions are defined in pixels, and there is nowhere in the ACBF file that tells you the size of the original images, so if at a later point you replace them with higher or lower resolution pages, the frames will be in the wrong place.

Comics creators will usually work in much higher resolution than what they would distribute for download, typically something like 10"x7" at 600dpi, or 6000x4200 pixels, and will then export lower resolution JPEG's for distribution. If you use ACBF to define your frames and speech bubbles, you'll be stuck at using whatever resolution you originally exported your comic in, or having to go through and redefine all the panels again.

Is there any way to support percentages, or some kind of resolution independent frame and speech bubble definitions?

---

The reason I'm asking is mainly because I'm working on a simple JavaScript web comics reader that supports panel-by-panel reading (code is here https://github.com/ragtag/panel-by-panel). It's main goal is to create a simple to use tool for web comics artists to make their web comics mobile friendly. I am currently using a basic JSON format for defining the pages and panels, and using percentages instead of pixels (x,y,width and height of each panels in %). As far as I can tell the EPUB3 format (http://www.idpf.org/epub/renditions/region-nav/#sec-3) seems to have gone with percentages too, though I don't know of any tool that can either make or make use of that data.

I haven't written an interface for defining the pages and panels yet, and figured it would be better to rely on existing standards, such as ACBF, rather than trying to re-invent the wheel. My current plan is to do one or more of the following:

1. Write a simple command line script that converts ACBF data into a json that works with my reader.
2. Writing support directly in the JavaScript reader that uses ACBF xml files directly.
3. Writing an exporter for my Gimp Book plug-in to either my format or ACBF (Wolthera has already implemented most of ACBF in her Krita Comics Manager).
4. Write my own little tool for defining panels (re-inventing the wheel).
5. Something clever, I haven't thought of yet. :)

As there are already quite a few comics in the ACBF format, it makes sense for me to implement some kind of support for it in my reader. For 1 and 2, changing image resolution would be an issue, 3 would solve this, as you would be going from the original to a scaled version, as you genearte the ACBF xml.

I think I've gone a bit of track here, and it's late, but thoughts and input are welcome. :)

Question information

Language:
English Edit question
Status:
Solved
For:
Advanced Comic Book Format Edit question
Assignee:
No assignee Edit question
Solved by:
ragtag
Solved:
Last query:
Last reply:
Revision history for this message
Robert Kubík (Pastierovič) (just-me) said :
#1

Hi,

I was already thinking about adding optional relative positioning. Should not be a big problem, something like:

<frame points_perc="10.5,0 20.4,0 55.34,80.3 10.24,100"/>

or

<frame points_rel="0.15,0 0.204,0 0.5534,0.803 0.1024,0.1"/>

Personally, I don't like this much as it will require using decimal numbers to have some kind of precision there, but I can add it to specs if you want to use this notation. Should not be a big problem to add support for it to viewer and editor (they actually support ACV file format which has relative notation).

I've never needed to use relative notation in a code, once I load the file I know what size it is and where to position frames/text-areas. When I draw, I draw on original image which I resize afterwards if needed. Or you can have some image_resize_ratio variable which you can use then to recalculate polygon points.

Also in regards to resizing, ACBF Editor can resize the whole ACBF document including images/frames/text-areas from command line, see https://acbf.wikia.com/wiki/ACBF_Editor#Command_Line_support.

Cheers

Revision history for this message
ragtag (ragtag-ragtag) said :
#2

That's great to hear. I didn't actually know that the ACBF Editor could be used to resize the pages, including frames, which kind of makes this a non-issue. I tested doing the same with Krita's Comics Manager, scaling the comic on export, and the frames worked fine in the export, so then you have at least two options to work with.

This gives me even more reasons to support the ACBF format for my little panel-by-panel web comics reader, and like you say, I wouldn't actually need relative positioning in my code, as I can check the size of the images in JavaScript, and figure everything out from there.

Hmmm....this makes me tempted to implement an ACBF exporter in Gimp Book. :)

Thanks again for the quick reply.