Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rM2 screenshots (wishlist ;) ) #210

Open
mazop opened this issue Feb 5, 2021 · 18 comments
Open

rM2 screenshots (wishlist ;) ) #210

mazop opened this issue Feb 5, 2021 · 18 comments

Comments

@mazop
Copy link

mazop commented Feb 5, 2021

...... taking screenshot's at the rM2 would be great ;)
UI: 'take screenshot --> send by mail (as png)' would be good enough .... :P

#ddvk wishlist

@ddvk
Copy link
Owner

ddvk commented Feb 11, 2021

what is the usecase? is it much different than send png page to email?

@Baccanno
Copy link

I enter the conversation, using a onboard screenshot tool would allow to flatten drawings in case it becomes too heavy in term of strokes. Then we could start drawing again on top of it.
Best

@dstango
Copy link

dstango commented Mar 14, 2021

Flattening the drawings doesn't work with the way the rm handles notebooks: the strokes are stored in ".lines"-files that don't support images. The suggestion of flattening drawings could be achieved by converting the notebook to a pdf-file, and then drawing could be continued on the pdf-file. But it would come at a cost (beside being probably some effort to implement that might exceed the "hack"-realm): it's currently not possible to add/delete/rearrange pages in pdf files, so a notebook with "flattened drawings" would be in a kind of frozen state - at least in regard to page count and order. Plus: it's also not possible to change templates in pdf files, as the pdf file kind of is the template.

@Baccanno
Copy link

@dstango I feel I've been misunderstood, so I'll go into more details, I indeed hint to the fact that it will destroy all previous stroke information, this is what flattening is in common artistic workflow, then you just paint over the template/pdf file to keep going. This is what is done in photoshop when things are becoming cumberstone with smart objects and effects.

Regarding the implementation, I kinda believe it's not unattainable, it may not have its place in the RM hacks but I'd let people that know more about RM2 dev talk, yet I feel it's just a plain copy of the fb into a pdf file (let's just hide everything else before taking the actual screenshot)

@ddvk To add more weight to the subject :

My suggestion comes in to enhance perf on large paintings. After like 1h of work it really becomes unusable. (Also, for art workflow this suggestion would add a LOT to the pencil #241)

Basically my actual workflow is to screenshot the drawing from RCU to have a fb match, convert it back to PDF or uploaded it as a template (but then it makes an awful lot of template, not really practical) and paint over it. I don't care about having multiple pages one canvas is enough.

But you can see the workflow is painful and needs a computer. So anything that would help in that sens is welcome. I feel the screenshot tool work, if people have other suggestion they are welcome.

Thank you so much for your work.

@dstango
Copy link

dstango commented Mar 14, 2021

@Baccanno so your basic wish could boil down to: export page(s) to pdf with page(s) as bitmap(s) and have this pdf available directly on the rm instead of emailing it somewhere, right?

I"m not aware right now: if a notebook is exported as pdf (for mail) -- is it converted to bitmap or some vector format? If bitmap: your use case could currently be achieved using the desktop app (maybe even mobile) by exporting to pdf and then reimporting, right? So your suggestion would be a shortcut to that process.

(I think I understood what you meant by flattening, yet it can't be achieved by keeping the notebook type of the document, that"s all I meant. PDF yes.)

@Baccanno
Copy link

Baccanno commented Mar 14, 2021

Yes that is definitely it. Thanks for the reformulation

@dstango export page(s) to pdf with page(s) as bitmap(s) and have this pdf available directly on the rm

Right, I'm using RCU as the desktop app atm (I'm not using cloud feature)

@dstango your use case could currently be achieved using the desktop app (maybe even mobile) by exporting to pdf and then reimporting, right? So your suggestion would be a shortcut to that process.

@Baccanno Basically my actual workflow is to screenshot the drawing from RCU to have a fb match, convert it back to PDF or uploaded it as a template (but then it makes an awful lot of template, not really practical) and paint over it. I don't care about having multiple pages one canvas is enough.

@dstango
Copy link

dstango commented Mar 14, 2021

@Baccanno one thing to consider is the resolution of the flattened bitmap in the pdf. If you want to be able to use your drawing e.g. for printout this would be something of interest, I guess.

@Baccanno
Copy link

Baccanno commented Mar 14, 2021

@dstango Well, resolution / dpi is not that bad, (didn't check the exported DPI of RCU screenshots though). I'm not sure we could use any other resolution as the actual fb, otherwise you would have to recreate the whole stroking algorithme as RCU dev did (he gets great result, but it's still not enough for art)

Also here you can find a Reddit post on my workflow after export

I also explain a bit more about the need for #241 feature.

@catflint
Copy link

I recommend just saving different versions of the file as you work on the piece and delete layers as you go. If you make a mistake, or delete the wrong layer, you will have backups.

Then, when the piece is finished, combine by copy and pasting the contents of the lower layers into one final layer and delete the rest. It seems like a lot of steps but the workflow is similar to what you would do on photoshop anyway, just without the luxury of flattening.

If you need me to explain this more clearly just let me know.

@Baccanno
Copy link

Baccanno commented Mar 15, 2021

@catflint Hello, some people suggested that already, however I'm not sure it'll work,

I recommend just saving different versions of the file as you work on the piece and delete layers as you go. If you make a mistake, or delete the wrong layer, you will have backups.

Already doing that with a single layer. layers are pretty slow to work with, moreover their selection & visibility are not remembered (unless it's been changed in these hacks)

Then, when the piece is finished, combine by copy and pasting the contents of the lower layers into one final layer and delete the rest. It seems like a lot of steps but the workflow is similar to what you would do on photoshop anyway, just without the luxury of flattening.

If you need me to explain this more clearly just let me know.

  • Are your sure it'll flatten everything and stop from rendering each stroke individually ? I have the feeling it will keep all vector informations hence slowness. These is something I do a lot in PS as well (new empty layer then merge to flatten) but not sure it'll work the same way here.
  • How do you select all the under layer ? the selection tool have hard time doing this properly.

@ddvk
Copy link
Owner

ddvk commented Apr 11, 2021

this is doable without the hacks, outside of xochitl. you need something to handle shortcuts like genie and then execute a script that captures the fb and does the conversion to pdf

@Baccanno
Copy link

this is doable without the hacks, outside of xochitl. you need something to handle shortcuts like genie and then execute a script that captures the fb and does the conversion to pdf

Sounds good enough, I'll give it a shot sometime in the future. I'll post my endeavors here.
Installing Genie and finding a way to get the fb seems should be found alright, not sure about how to create a pdf though.

@ddvk
Copy link
Owner

ddvk commented Apr 16, 2021

this is doable without the hacks, outside of xochitl. you need something to handle shortcuts like genie and then execute a script that captures the fb and does the conversion to pdf

Sounds good enough, I'll give it a shot sometime in the future. I'll post my endeavors here.
Installing Genie and finding a way to get the fb seems should be found alright, not sure about how to create a pdf though.

to create a pdf probably imagemagick, mupdf or something else that can run on the device (unipdf should work as well)

@Baccanno
Copy link

Baccanno commented Apr 16, 2021

I knew imagemagick could do it, was not sure to find the according package.
I'll try an even further trickery. I'd try to zoom x2 in the drawing and take 4 screenshots of each part of the drawing. So I'd have finer details once exported on the pc.
Thanks for the insights.

@Baccanno
Copy link

So I tried with GraphicsMagick (ImageMacgick fork) from opkg.
rien/reStream#28 (comment)
This is what I did for now. I'll still investigate as it seem to not be working yet

cat /dev/fb0 > raw
convert -depth 8 -size 1872x1404+0 gray:raw out.png
gm convert: Unexpected end-of-file (raw).

@Baccanno
Copy link

I tried the same with image magick though same issue.

@Baccanno
Copy link

From the thread and an updated version of resnap got this

pid=$(pidof xochitl)
offset=$(grep "/dev/shm/swtfb.01" /proc/$pid/maps | awk -F '-' '{print substr($2, 0, 8)}')
dd if=/proc/$pid/mem bs=1 count=2628288 skip=$((0x$offset + 8)) 2>/dev/null > raw
gm convert -depth 8 -size 1872x1404+0 gray:raw out.pdf

But right now the output pdf is noise only.

@ddvk
Copy link
Owner

ddvk commented May 18, 2021

the depth/geometry is probably wrong, the swftb is rb565le (16bit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants