Skip to content

Commit adc761a

Browse files
Converted comic example to percentage based fragments
1 parent b4f5632 commit adc761a

1 file changed

Lines changed: 29 additions & 31 deletions

File tree

examples/comics/guided.json

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"guided": [
33
{
4-
"imgref": "page1.jpg#xywh=41,41,918,445",
4+
"imgref": "page1.jpg#xywh=percent:4.1,4.1,91.8,44.5",
55
"role": ["panel"],
66
"character": ["Pepper", "Carrot", "Cayenne", "Cumin", "Thyme"],
77
"description": {
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
{
13-
"imgref": "page1.jpg#xywh=41,503,300,215",
13+
"imgref": "page1.jpg#xywh=percent:4.1,50.3,30.0,21.5",
1414
"role": ["panel"],
1515
"character": ["Cumin"],
1616
"description": {
@@ -26,7 +26,7 @@
2626
]
2727
},
2828
{
29-
"imgref": "page1.jpg#xywh=355,503,604,215",
29+
"imgref": "page1.jpg#xywh=percent:35.5,50.3,60.4,21.5",
3030
"role": ["panel"],
3131
"character": ["Pepper"],
3232
"description": {
@@ -47,7 +47,7 @@
4747
]
4848
},
4949
{
50-
"imgref": "page1.jpg#xywh=41,735,918,224",
50+
"imgref": "page1.jpg#xywh=percent:4.1,73.5,91.8,22.4",
5151
"role": ["panel"],
5252
"character": ["Pepper", "Carrot"],
5353
"description": {
@@ -62,7 +62,7 @@
6262
]
6363
},
6464
{
65-
"imgref": "page2.jpg.#xywh=41,41,918,194",
65+
"imgref": "page2.jpg#xywh=percent:4.1,4.1,91.8,19.4",
6666
"role": ["panel"],
6767
"character": ["Cayenne", "Cumin", "Thyme"],
6868
"description": {
@@ -71,7 +71,7 @@
7171
}
7272
},
7373
{
74-
"imgref": "page2.jpg.#xywh=41,252,918,260",
74+
"imgref": "page2.jpg#xywh=percent:4.1,25.2,91.8,26.0",
7575
"role": ["panel"],
7676
"character": ["Pepper", "Carrot"],
7777
"description": {
@@ -80,14 +80,12 @@
8080
},
8181
"children": [
8282
{
83-
"imgref": "page2.jpg#xywh=41,252,459,260",
8483
"role": ["speechBubble"],
8584
"character": ["Pepper"],
8685
"text": "Alright then, off to the land of the setting moons. Shichimi can tell us how to join the witches of Ah.",
8786
"audioref": "audio/page2-panel2-bubble1.mp3"
8887
},
8988
{
90-
"imgref": "page2.jpg#xywh=500,252,459,260",
9189
"role": ["speechBubble"],
9290
"character": ["Pepper"],
9391
"text": "Carrot, get out the map and compass: it's too cloudy to see where I'm going",
@@ -96,7 +94,7 @@
9694
]
9795
},
9896
{
99-
"imgref": "page2.jpg#xywh=41,529,301,442",
97+
"imgref": "page2.jpg#xywh=percent:4.1,52.9,30.1,44.2",
10098
"role": ["panel"],
10199
"character": ["Carrot"],
102100
"description": {
@@ -105,7 +103,7 @@
105103
}
106104
},
107105
{
108-
"imgref": "page2.jpg#xywh=357,529,287,442",
106+
"imgref": "page2.jpg#xywh=percent:35.7,52.9,28.7,44.2",
109107
"role": ["panel"],
110108
"character": ["Pepper", "Carrot"],
111109
"description": {
@@ -122,7 +120,7 @@
122120
]
123121
},
124122
{
125-
"imgref": "page2.jpg#xywh=658,529,301,442",
123+
"imgref": "page2.jpg#xywh=percent:65.8,52.9,30.1,44.2",
126124
"role": ["panel"],
127125
"character": ["Pepper", "Carrot"],
128126
"description": {
@@ -143,7 +141,7 @@
143141
]
144142
},
145143
{
146-
"imgref": "page3.jpg#xywh=41,41,918,153",
144+
"imgref": "page3.jpg#xywh=percent:4.1,4.1,91.8,15.3",
147145
"role": ["panel"],
148146
"description": {
149147
"audioref": "audio/page3-panel1-description.mp3",
@@ -157,7 +155,7 @@
157155
]
158156
},
159157
{
160-
"imgref": "page3.jpg#xywh=41,211,918,170",
158+
"imgref": "page3.jpg#xywh=percent:4.1,21.1,91.8,17.0",
161159
"role": ["panel"],
162160
"character": ["Pepper", "Carrot"],
163161
"description": {
@@ -166,7 +164,7 @@
166164
}
167165
},
168166
{
169-
"imgref": "page3.jpg#xywh=41,398,918,170",
167+
"imgref": "page3.jpg#xywh=percent:4.1,39.8,91.8,17.0",
170168
"role": ["panel"],
171169
"character": ["Pepper", "Carrot"],
172170
"description": {
@@ -175,7 +173,7 @@
175173
}
176174
},
177175
{
178-
"imgref": "page3.jpg#xywh=41,585,918,386",
176+
"imgref": "page3.jpg#xywh=percent:4.1,58.5,91.8,38.6",
179177
"role": ["panel"],
180178
"character": ["Pepper", "Carrot", "Monster"],
181179
"description": {
@@ -184,7 +182,7 @@
184182
}
185183
},
186184
{
187-
"imgref": "page4.jpg#xywh=41,41,452,209",
185+
"imgref": "page4.jpg#xywh=percent:4.1,4.1,45.2,20.9",
188186
"role": ["panel"],
189187
"character": ["Pepper", "Monster"],
190188
"description": {
@@ -201,7 +199,7 @@
201199
]
202200
},
203201
{
204-
"imgref": "page4.jpg#xywh=508,41,451,209",
202+
"imgref": "page4.jpg#xywh=percent:50.8,4.1,45.1,20.9",
205203
"role": ["panel"],
206204
"character": ["Monster"],
207205
"description": {
@@ -210,7 +208,7 @@
210208
}
211209
},
212210
{
213-
"imgref": "page4.jpg#xywh=41,265,918,285",
211+
"imgref": "page4.jpg#xywh=percent:4.1,26.5,91.8,28.5",
214212
"role": ["panel"],
215213
"character": ["Pepper", "Monster"],
216214
"description": {
@@ -227,7 +225,7 @@
227225
]
228226
},
229227
{
230-
"imgref": "page4.jpg#xywh=41,565,918,406",
228+
"imgref": "page4.jpg#xywh=percent:4.1,56.5,91.8,40.6",
231229
"role": ["panel"],
232230
"character": ["Pepper", "Carrot", "Monster"],
233231
"description": {
@@ -255,15 +253,15 @@
255253
]
256254
},
257255
{
258-
"imgref": "page5.jpg#xywh=41,41,918,185",
256+
"imgref": "page5.jpg#xywh=percent:4.1,4.1,91.8,18.5",
259257
"role": ["panel"],
260258
"description": {
261259
"audioref": "audio/page5-panel1-description.mp3",
262260
"text": "The desert stretches across the horizon. From this perspective, Pepper and Carrot look like two small figures. The land is mostly barren, but a few plants are visible across the dunes."
263261
}
264262
},
265263
{
266-
"imgref": "page5.jpg#xywh=41,244,459,380",
264+
"imgref": "page5.jpg#xywh=percent:4.1,24.4,45.9,38.0",
267265
"role": ["panel"],
268266
"description": {
269267
"audioref": "audio/page5-panel2-description.mp3",
@@ -284,7 +282,7 @@
284282
]
285283
},
286284
{
287-
"imgref": "page5.jpg#xywh=518,244,441,380",
285+
"imgref": "page5.jpg#xywh=percent:51.8,24.4,44.1,38.0",
288286
"role": ["panel"],
289287
"character": ["Pepper"],
290288
"description": {
@@ -301,7 +299,7 @@
301299
]
302300
},
303301
{
304-
"imgref": "page5.jpg#xywh=41,643,918,316",
302+
"imgref": "page5.jpg#xywh=percent:4.1,64.3,91.8,31.6",
305303
"role": ["panel"],
306304
"character": ["Pepper", "Carrot"],
307305
"description": {
@@ -318,7 +316,7 @@
318316
]
319317
},
320318
{
321-
"imgref": "page6.jpg#xywh=84,30,840,402",
319+
"imgref": "page6.jpg#xywh=percent:4.1,4.1,91.8,29.5",
322320
"role": ["panel"],
323321
"character": ["Pepper", "Carrot"],
324322
"description": {
@@ -327,7 +325,7 @@
327325
}
328326
},
329327
{
330-
"imgref": "page6.jpg#xywh=41,41,918,295",
328+
"imgref": "page6.jpg#xywh=percent:4.1,35.6,23.0,29.0",
331329
"role": ["panel"],
332330
"character": ["Pepper"],
333331
"description": {
@@ -336,7 +334,7 @@
336334
}
337335
},
338336
{
339-
"imgref": "page6.jpg#xywh=41,356,230,290",
337+
"imgref": "page6.jpg#xywh=percent:29.1,35.6,66.8,29.0",
340338
"role": ["panel"],
341339
"character": ["Pepper", "Carrot"],
342340
"description": {
@@ -359,7 +357,7 @@
359357
]
360358
},
361359
{
362-
"imgref": "page6.jpg#xywh=41,666,459,293",
360+
"imgref": "page6.jpg#xywh=percent:4.1,66.6,45.9,29.3",
363361
"character": ["Pepper", "Carrot"],
364362
"description": {
365363
"audioref": "audio/page6-panel4-description1.mp3",
@@ -375,15 +373,15 @@
375373
]
376374
},
377375
{
378-
"imgref": "page6.jpg#xywh=41,666,918,293",
376+
"imgref": "page6.jpg#xywh=percent:50.0,66.6,45.9,29.3",
379377
"character": ["Pepper", "Carrot", "Shichimi", "Two-tailed fox companion"],
380378
"description": {
381379
"audioref": "audio/page6-panel4-description2.mp3",
382380
"text": "Shichimi waves back with both hands. In the background, we can see temples half hanging in the sky, with waterfalls dropping from these pieces of land."
383381
}
384382
},
385383
{
386-
"imgref": "page7.jpg#xywh=41,41,918,280",
384+
"imgref": "page7.jpg#xywh=percent:4.1,4.1,91.8,28.0",
387385
"role": ["panel"],
388386
"character": ["Pepper", "Carrot", "Shichimi", "Two-tailed fox companion"],
389387
"description": {
@@ -406,7 +404,7 @@
406404
]
407405
},
408406
{
409-
"imgref": "page7.jpg#xywh=140,335,720,155",
407+
"imgref": "page7.jpg#xywh=percent:14.0,33.5,72.0,15.5",
410408
"role": ["panel"],
411409
"character": ["Pepper", "Carrot"],
412410
"description": {
@@ -415,7 +413,7 @@
415413
}
416414
},
417415
{
418-
"imgref": "page7.jpg#xywh=41,505,918,455",
416+
"imgref": "page7.jpg#xywh=percent:4.1,50.5,91.8,45.5",
419417
"role": ["panel"],
420418
"character": ["Pepper", "Carrot", "Cayenne", "Cumin", "Thyme"],
421419
"description": {

0 commit comments

Comments
 (0)