• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ChordPro and images
#19
Okay, this is how far I've got.

The syntax for the {image} directive has a new argument 'id=XXX' that specifies a known asset identified by the id 'XXX'. 'XXX' may be an arbitrary identifier.
For the {image} directive, the asset should be an image.
How the relation from 'XXX' to the image is established is up to the application program.

One way to define an asset is with a special file comment (not to be mistaken with a ChordPro {comment}). Such a comment looks like:

Code:
##image: id=XXX

Minimal, or with all options:

Code:
##image: id=XXX src=im.png type=png width=1341 height=340 enc=base64

which is immedeately followed by the data for the image, base64 encoded, in lines that start with "# " (pound space).

Code:
# iVBORw0KGgoAAAANSUhEUgAABT0AAAFUCAIAAABp2w/aAAAABGdBTUEAALGPC/xhBQAAAER0RVh0
# U29mdHdhcmUAWFYgdmVyc2lvbiAzLjEwYS1qdW1ib0ZpeCtFbmggb2YgMjAwODEyMTYgKGludGVy
... many more ...
# AAd0SU1FB+AEBwgjAAJ9CYIAAAAedEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1QCpgy
# LukAAAAASUVORK5CYII=

So when the user presents a ChordPro file with one or more {image}s, Companion can change the {image} directives and include the image data as shown above. For people that do not use Companion, there are other tools that can assist.

When a song is edited in MSPro, the asset data can be omitted to not clobber the view and/or slow down the editor.

What do you think?
Johan
www.johanvromans.nlwww.hetgeluidvanseptember.nlwww.howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 11.0, AirTurn Duo & Digit.
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (non-MSPRo, backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply


Messages In This Thread
ChordPro and images - by sciurius - 03-31-2016, 06:17 PM
RE: ChordPro and images - by itsme - 03-31-2016, 08:37 PM
RE: ChordPro and images - by sciurius - 03-31-2016, 09:35 PM
RE: ChordPro and images - by Zubersoft - 04-01-2016, 03:20 AM
RE: ChordPro and images - by sciurius - 04-01-2016, 04:03 AM
RE: ChordPro and images - by Zubersoft - 04-01-2016, 04:24 AM
RE: ChordPro and images - by AndyL - 04-02-2016, 12:55 AM
RE: ChordPro and images - by Zubersoft - 04-02-2016, 09:16 PM
RE: ChordPro and images - by itsme - 04-02-2016, 09:53 PM
RE: ChordPro and images - by NeoCZ - 11-15-2018, 05:53 AM
RE: ChordPro and images - by Zubersoft - 11-18-2018, 05:43 AM
RE: ChordPro and images - by sciurius - 11-18-2018, 08:19 AM
RE: ChordPro and images - by Zubersoft - 11-18-2018, 11:47 AM
RE: ChordPro and images - by sciurius - 11-19-2018, 06:34 AM
RE: ChordPro and images - by NeoCZ - 11-19-2018, 07:59 AM
RE: ChordPro and images - by sciurius - 11-20-2018, 06:47 PM
RE: ChordPro and images - by Zubersoft - 11-22-2018, 02:50 AM
RE: ChordPro and images - by sciurius - 11-22-2018, 07:42 AM
RE: ChordPro and images - by sciurius - 11-22-2018, 09:18 PM
RE: ChordPro and images - by Zubersoft - 11-23-2018, 02:02 AM
RE: ChordPro and images - by sciurius - 11-23-2018, 04:32 AM
RE: ChordPro and images - by Geoff Bacon - 11-23-2018, 05:19 AM
RE: ChordPro and images - by sciurius - 11-23-2018, 06:18 AM
RE: ChordPro and images - by ammelch - 09-27-2019, 02:19 AM
RE: ChordPro and images - by Zubersoft - 09-27-2019, 02:58 AM
RE: ChordPro and images - by laurent - 12-21-2020, 06:18 PM
RE: ChordPro and images - by BRX - 12-22-2020, 08:19 PM
RE: ChordPro and images - by sciurius - 12-23-2020, 07:23 PM
RE: ChordPro and images - by Heronimus - 07-30-2021, 10:37 PM
RE: ChordPro and images - by NeoCZ - 12-23-2020, 08:12 PM
RE: ChordPro and images - by eichelbe - 12-31-2020, 06:07 PM
RE: ChordPro and images - by sciurius - 12-31-2020, 06:50 PM
RE: ChordPro and images - by eichelbe - 12-31-2020, 07:06 PM
RE: ChordPro and images - by charly44 - 05-27-2021, 03:43 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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