After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795842 - Allow to record and play strokes with different settings
Allow to record and play strokes with different settings
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: General
2.10.0
Other All
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-05-05 19:47 UTC by Laxminarayan G Kamath A
Modified: 2018-05-24 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The PDF generated by my BoogieBoard (92.45 KB, application/pdf)
2018-05-05 19:47 UTC, Laxminarayan G Kamath A
Details
The InkML extracted from the PDF (60.38 KB, text/xml)
2018-05-05 19:49 UTC, Laxminarayan G Kamath A
Details
A sample image generated using my scripts from the InkML in the PDF (675.84 KB, image/jpeg)
2018-05-05 19:50 UTC, Laxminarayan G Kamath A
Details
Sample image 2 generated using my scripts from the InkML in the PDF (688.28 KB, image/jpeg)
2018-05-05 19:52 UTC, Laxminarayan G Kamath A
Details
Sample image 3 generated using my scripts from the InkML in the PDF (807.89 KB, image/jpeg)
2018-05-05 19:53 UTC, Laxminarayan G Kamath A
Details
Sample image 4 generated using my scripts from the InkML in the PDF (1.05 MB, image/jpeg)
2018-05-05 19:54 UTC, Laxminarayan G Kamath A
Details

Description Laxminarayan G Kamath A 2018-05-05 19:47:33 UTC
Created attachment 371731 [details]
The PDF generated by my BoogieBoard

tl;dr .. being able to record and play brush strokes , preferably to InkML is awesome! look at the attachments! 

The looong one: [some of this may not seem important , but will help me with other bugs I want to report. I will link this bug instead of repeating the whole story]

I have a BoogieBoard https://myboogieboard.com/ . It allows to draw on the single pixel LCD, and stores the result in PDF files (sample attached). I assumed the PDF just had an image, so using some python and pdfrw, I tried extracting the image. 

But to my amazement, there was an XML file. Upon proper inspection, I found out it was an InkML https://www.w3.org/TR/InkML/ . I really loved the specification , and with some initial struggle, was able to extract it . I wrote a quick script initially to read the strokes and draw it using GIMP. (Kudos to their team for using a relatively open format!!) 

The scripts are available here: https://github.com/kamathln/boogiepdf  WARNING: The script was written as a toy, is buggy, and hogs CPU and takes a long time to render if you don't skip importing pressure(which is unfortunately pointless) . It also makes itself as the default for PDF files (at least on my machine), which can create a crater under you if it thinks it is a good time to make thumbnails for the whole folder. (This is because there is no GIMP procedure with which I can play the whole stroke back with dynamics or opacity and pressure information - so for every step in the stroke, I have to set the opacity and size of the brush - and I have not even implemented the angles, as my device does not record them)

That is when I realized It would be awesome to record and play strokes. Imagine:
1) being able to experiment with how a set of strokes is rendered.
2) being able to repeat a set of strokes in the same image with slightly different settings, angle, perspective (say to draw fur, grass, lion mane, hair
3) being able to share a set of strokes across projects .. Say I use my digitizer to create a good page corner decoration, and using GIMP, record those strokes to an InkML file. I could then use the same strokes in different projects using different brush settings, dynamics, colors, and what not, according to the theme of the project!
4) being able to share the same stroke with other apps like InkScape, Krita, Blender! Or some animation software that animates your strokes exactly how you recorded it.
Comment 1 Laxminarayan G Kamath A 2018-05-05 19:49:31 UTC
Created attachment 371732 [details]
The InkML extracted from the PDF
Comment 2 Laxminarayan G Kamath A 2018-05-05 19:50:39 UTC
Created attachment 371733 [details]
A sample image generated using my scripts from the InkML in the PDF
Comment 3 Laxminarayan G Kamath A 2018-05-05 19:52:58 UTC
Created attachment 371734 [details]
Sample image 2 generated using my scripts from the InkML in the PDF
Comment 4 Laxminarayan G Kamath A 2018-05-05 19:53:37 UTC
Created attachment 371735 [details]
Sample image 3 generated using my scripts from the InkML in the PDF
Comment 5 Laxminarayan G Kamath A 2018-05-05 19:54:13 UTC
Created attachment 371736 [details]
Sample image 4 generated using my scripts from the InkML in the PDF
Comment 6 Laxminarayan G Kamath A 2018-05-06 06:11:52 UTC
I mention this bug in bug#795846 and bug#795843
Comment 7 Jehan 2018-05-09 13:15:11 UTC
This is all basically awesome, of course.
Now we'll need to make sure that InkML or any spec can do as much as GIMP if we want to record strokes this way. In our studio, we tried similar vector tablets (Wacom one), and the drawing result is very limited (basically it is not meant for drawing, but for scribbling, or as a meeting notepad, or leaving messages, or whatnot). So I would assume the formats behind would not be much for drawing either and would not raise my hopes too much.

If quality is indeed not there, it would still be possible to record the strokes as InkML as side feature. Or if we implement record/replay of strokes with core code (this has been mentioned a few times), we could also have a lossy export feature, why not.
Comment 8 Laxminarayan G Kamath A 2018-05-11 11:04:50 UTC
Hi Jehan, thanks for your input. I would like to add - for this ticket ( as the title says -) recording and playing strokes is what is important. InkML is secondary. The recording of strokes need not be on the tablet side. It could also be on GIMP side. 

GIMP receives the device input anyway, so we can simply record that. It could be in its own native format if InkML is not upto quality. But being able to export and import those strokes to and from InkML would be nice, sort of like exporting and importing paths

In case you missed comment 6 in the rush of attachments, do also read bug#795846 and bug#795843 .
Comment 9 GNOME Infrastructure Team 2018-05-24 19:47:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1411.