HP Forums

Full Version: DIMGROB back from Graphics Variable?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to get a DIMGROB from a G1 Graphic Variable, so that I can include it in a program, instead of having to transport the .png file from which the G1 is created with the program, for another person to try out?

So if G1 is defined on a HP Prime, is there a way to get a DIMGROB from the calc?
I found a way to do it, but it will obviously require a large amount of space in the program, it works though, and can be used to put sprites into a program and not need to send any files along with the program.

LOCAL CXL:="DIMGROB(G1,26,26,{";
    FOR X FROM 0 TO 25 DO
  CXL:=CXL+GETPIX_P(G1,X,Y)+", ";

This saves the colours of the 'sprite' or graphic which can be loaded as a PNG, to a notes file called COL, which can be viewed on computer, and then pasted as a DIMGROB, and therefore entered into a program.
Reference URL's