Note on archived topics.
12-09-2013 10:45 AM
In the HP Prime help I found an entry "ICON" under Program Catalog -> Commands Menu -> Drawing Commands -> ICON:
Maybe it is just an artifact of a feature which is not yet ready or that was abandoned. But it would be nice to be able to modify an App's icon. How can I add a PNG file to the calculator at all? it does not show up as a mass storage device. Or do I have to create the PNG on the calculator itself by "programming" the graphic and copying the pixel graphic into a variable? And if anybody can find DIMGROBHelper.exe what does it do?
12-09-2013 11:51 PM
The ICON keyword is there in the latest SW version and can be used for graphics...
HOWEVER, the application ICON overlay is not there (sorry)...
Attached is a program that you can use to create ICON lines in your programs (file is a .zip, but renamed to pass filters).
here is an example of use:
ICON sprite 89504E470D0A1A0A0000000D494844520000000A0000000A04030000007F1CD28E0000000F504C5445FFFFFFFF00FF8080000000FF8000806183D7450000000574524E530000000000C26B06B100000038494441547801358BD10900201042ED6A80331A205AA1050E6AFF9992A8F7A1204F3C121D603595DBEC445B37F3D0C24D0F292C21F35F70005B400312647D79A00000000049454E44AE426082;
for a:=0 to 1000 do
blit_p(randint(320), randint(240), "sprite");
05-30-2017 01:36 PM - edited 05-30-2017 01:40 PM
* * * cyrille * * *
Thank you very much for posting program and program examples. With them (and a lot of other examples) I was able to write a really handy program for notes (notes can be scanned and then uploaded to HP Prime for browsing, the images are 320x240, so one image/page fits a screen, the first pages I use for INDEX/table of contents).
If anyone is interested in source code, one can find it:
// PLACE FOR ICONS
//ICON SL0 ...
EXPORT P2_NOTE() BEGIN LOCAL x,y,screenW:=320,screenH:=240; LOCAL SLN:=5; LOCAL LOKACIJA:=0; LOCAL LOKACIJAT:=0; LOCAL IZHOD:=0; // LOCAL DRAW:=1; //Na začetku izrišemo sliko LOCAL TIPKA; REPEAT IF DRAW=1 THEN //DRAW IMAGE ON G0 BLIT_P(G0,0,0,screenW,screenH,"SL"+LOKACIJA,0,0); DRAW:=0; END; TIPKA:=GETKEY; CASE IF TIPKA=4 THEN BREAK; END; // EXIT IF TIPKA=50 AND LOKACIJA<SLN-1 THEN // POVECAJ LOKACIJA LOKACIJA:=LOKACIJA+1; DRAW:=1; END; IF TIPKA=45 AND LOKACIJA>0 THEN // ZMANJSAJ LOKACIJA LOKACIJA:=LOKACIJA-1; DRAW:=1; END; IF TIPKA=30 THEN // ENTER, za potrditev LOKACIJAT IF LOKACIJAT<SLN AND LOKACIJAT>=0 THEN //OK VNESENA LOKACIJA? LOKACIJA:=LOKACIJAT; DRAW:=1; END; LOKACIJAT:=0; END; IF TIPKA=47 THEN LOKACIJAT:=10*LOKACIJAT+0; END; // Pritisnjena 0 IF TIPKA=42 THEN LOKACIJAT:=10*LOKACIJAT+1; END; // Pritisnjena 1 IF TIPKA=43 THEN LOKACIJAT:=10*LOKACIJAT+2; END; // Pritisnjena 2 IF TIPKA=44 THEN LOKACIJAT:=10*LOKACIJAT+3; END; // Pritisnjena 3 IF TIPKA=37 THEN LOKACIJAT:=10*LOKACIJAT+4; END; // Pritisnjena 4 IF TIPKA=38 THEN LOKACIJAT:=10*LOKACIJAT+5; END; // Pritisnjena 5 IF TIPKA=39 THEN LOKACIJAT:=10*LOKACIJAT+6; END; // Pritisnjena 6 IF TIPKA=32 THEN LOKACIJAT:=10*LOKACIJAT+7; END; // Pritisnjena 7 IF TIPKA=33 THEN LOKACIJAT:=10*LOKACIJAT+8; END; // Pritisnjena 8 IF TIPKA=34 THEN LOKACIJAT:=10*LOKACIJAT+9; END; // Pritisnjena 9 IF TIPKA=19 THEN LOKACIJAT:=iquo(LOKACIJAT,10); END; //Briši 1 črko IF TIPKA=25 THEN LOKACIJAT:=0; END; //Briši vse END; UNTIL IZHOD=1; END;
Sory it is in Slovene/English, if I have more time, I can edit comment and better explain the program.
+ increase page
- decrease page
NUMBER/S + ENTER -> enter custom page number
DEL - delete wrongly typed number
LOG - clear typed numbers
ESC - exit program
Now I would also like to praise HP Prime and its developers. Today I was playing with my scoolmate's TI NSPIRE CAS and I have found my HP Prime to be superior.
It has really nice programming language, easy to program, only documentation could be a little better. It has also PC suite and EMULATOR!!! With which I have done all the debugging for my program. And lastly the RPN MODE!!! I hope you are not going to kill it because of majority people being lazy and not trying to learn this amazing notation which helps solve problems much faster with the stack.
There are also some problems: poor screen, but is still better than TI NSPIRE's, and I would also like more RPN functionality earlier models had.
And another question regarding ICON/PNG type support. I have tried almost all types of PNG compressions I could (Photoshop: no compression, compression, web compression..., Painter, other programs) and was unable to successfully read the hex data for the images. What king of compression does you program use?
Otherwise great product,
Enjoy your day,
Images/ICONs are unfortunately too large for this message 😞
05-30-2017 02:57 PM - edited 05-30-2017 02:59 PM
Is you calculator all updated? I ask because since that original (very old) post, the calcualtor can now directy read/write PNG files. Any valid PNG (except for some extreemly unused obscure options) and jpg will be useable directly.
would save a png copy of your screen as "myscreen.png" in the current application.
would do the same, but as a jpg with quality of 75.
The problem with the "ICON" thing is that it will VERY quickly use a lot of memory.
You might want to take a look at the output from this tool: https://tiplanet.org/forum/editgx.php
It does pretty much what you are looking for. It could provide some insights on how to improve your tool perhaps. Glad you were able to get it working!
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
05-30-2017 06:34 PM
See, this example ... https://en.hpprime.club/apps/graphics/back
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/