cancel
Showing results for 
Search instead for 
Did you mean: 

Note on archived topics.

This topic has been archived. Information and links in this thread may no longer be available or relevant.
If you have a question create a new topic by clicking here and select the appropriate board.
Highlighted
StefanD
Level 1
12 10 0 0
Message 1 of 7
3,336
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

In the HP Prime help I found an entry "ICON" under Program Catalog -> Commands Menu -> Drawing Commands -> ICON:

 

Prime_ICON_1.png

 

Prime_ICON_2.png

 

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? 

0 Kudos
6 REPLIES 6
Level 6 cyrille
Level 6
214 213 36 66
Message 2 of 7
3,307
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

Hello,

 

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;

 

EXPORT test()
BEGIN
  local a;
  for a:=0 to 1000 do
    blit_p(randint(320), randint(240), "sprite");
  end;
  wait;
END;

 

Cyrille;

I am an HP Employee
0 Kudos
StefanD
Level 1
12 10 0 0
Message 3 of 7
3,277
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

Thank you cyrille!
So the "hexPngFile" is really just a big HEX number representing the file content of the PNG?

May I upload the zipfile with the DIMGROBHelper.exe to a public wiki?
0 Kudos
Level 6 cyrille
Level 6
214 213 36 66
Message 4 of 7
3,258
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

Hello

 

Yes, it is a hex dump (png magic number is 89 50 4e 47 0d 0a 1a 0a)...

 

Go ahead and upload the program.

 

Cyrille

I am an HP Employee
0 Kudos
ZiGa13
Level 1
4 3 1 0
Message 5 of 7
1,468
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

* * * 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.

COMMANDS:

+ 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,

Ziga

 

P.S.

Images/ICONs are unfortunately too large for this message 😞

0 Kudos
Level 8
Level 8
735 732 120 180
Message 6 of 7
1,457
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

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.

 

For example:

 

AFiles("myscreen.png"):=G0

 

would save a png copy of your screen as "myscreen.png" in the current application.

 

AFiles("myscreen.jpg",75):=G0

 

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!

TW

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.
0 Kudos
Level 9
3,551 3,490 180 536
Message 7 of 7
1,442
Flag Post
HP Recommended

HP Prime Help Entry: ICON (Setting App Icons?)

Hi!, @ZiGa13:

 

See, this example ... https://en.hpprime.club/apps/graphics/back

Kind Regards !.
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
0 Kudos

Note on archived topics.

This topic has been archived. Information and links in this thread may no longer be available or relevant.
If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation