I've been working on an image viewing add-in recently. It just reads a bitmap from the storage memory and displays it on the screen by using CopySprite like most other add-ins do while displaying their sprites/pictures, but this add-in requires absolutely no knowledge of programming. To get started, simply put ImgViewer.g3a and the image0 file on your Prizm. You can convert your own images using my converter (requires .NET 4.0). Then, just run the add-in from the main menu.

Right now, my program is having problems with 2 byte dimensions and takes a while to render images, but I should hopefully be able to fix that soon. I don't have any screenshots yet.

Download:
http://cemete.ch/dl742
On the one hand, I must congratulate you on the third Prizm image-viewing-related project that I have seen, and the first that tries to work with bitmap images (question: why can't it just read and open normal BMP images from the storage?). However, on the other hand, I must point out our many previous debates on the ethics and morality of an image viewer on the Prizms, especially this thread.
In response to the nonsense that is the "ethics" of an image viewer:
Quote:
<Merth_> When did we become a community of cowards?
<Merth_> We freaking factored the OS signing keys on the 83+s..
<Merth_> And now we're afraid of viewing images?
<Merth_> We played videos from our flashdrives on our 84+SE's. We can connect to the freakin' INTERNET from a GRAPHING CALCULATOR.
<Merth_> And we're afraid of viewing images?
<Merth_> This is nonsense.
<Merth_> But the fact that we're even discussing it shows that we've caved to TI's pressures.
<Merth_> We're hackers, dammit, not babies.
Congrats on this, Souvik Smile The reason why it is slow to render images is because you had to read the file in parts, right? You mentioned you were having issues with malloc()'ing, like, 44,004 bytes, right? Also, it can't read regular bitmaps because you use a slightly different file format, where the first few bytes are width and height, and the rest of it is 16bit colors? Are you interested in releasing the source, and if so, for all? I think it would be a good reference because it would show how to read in files.
_player1537 wrote:
Congrats on this, Souvik Smile The reason why it is slow to render images is because you had to read the file in parts, right? You mentioned you were having issues with malloc()'ing, like, 44,004 bytes, right? Also, it can't read regular bitmaps because you use a slightly different file format, where the first few bytes are width and height, and the rest of it is 16bit colors? Are you interested in releasing the source, and if so, for all? I think it would be a good reference because it would show how to read in files.

Yeah, that's why it's so slow. One thing I may do to speed it up is loading more than one row at a time if there is enough memory to do so. I probably won't release the source until I clean it up and optimize it, it's pretty embarrassing right now.
KermMartian wrote:
On the one hand, I must congratulate you on the third Prizm image-viewing-related project that I have seen, and the first that tries to work with bitmap images (question: why can't it just read and open normal BMP images from the storage?). However, on the other hand, I must point out our many previous debates on the ethics and morality of an image viewer on the Prizms, especially this thread.

I felt lazy. Razz Reading images that are already in a nice format makes reading and rendering much easier. There are also many different types of BMPs, and I felt that users would get confused if one type of BMP worked while another type didn't, despite having the same file extension.
souvik1997 wrote:
_player1537 wrote:
Congrats on this, Souvik Smile The reason why it is slow to render images is because you had to read the file in parts, right? You mentioned you were having issues with malloc()'ing, like, 44,004 bytes, right? Also, it can't read regular bitmaps because you use a slightly different file format, where the first few bytes are width and height, and the rest of it is 16bit colors? Are you interested in releasing the source, and if so, for all? I think it would be a good reference because it would show how to read in files.

Yeah, that's why it's so slow. One thing I may do to speed it up is loading more than one row at a time if there is enough memory to do so. I probably won't release the source until I clean it up and optimize it, it's pretty embarrassing right now.
KermMartian wrote:
On the one hand, I must congratulate you on the third Prizm image-viewing-related project that I have seen, and the first that tries to work with bitmap images (question: why can't it just read and open normal BMP images from the storage?). However, on the other hand, I must point out our many previous debates on the ethics and morality of an image viewer on the Prizms, especially this thread.

I felt lazy. Razz Reading images that are already in a nice format makes reading and rendering much easier. There are also many different types of BMPs, and I felt that users would get confused if one type of BMP worked while another type didn't, despite having the same file extension.
Enough memory... you have 512KB of stack space on top of heap space, there should be plenty of memory. I mentioned about changing PrizmSDK to give addins the actual stack space elsewhere.
Oh, I didn't know that. What would I change to be able to use the additional memory? I remember Ashbad saying something about the prizm.ld file, but I'm not sure what I should change.
Ashbad said, "change your 'rom: l=500K' (or something like that) in Prizm.ld in the "common" folder of the SDK to 'l=1250K'".
Spenceboy98 wrote:
Ashbad said, "change your 'rom: l=500K' (or something like that) in Prizm.ld in the "common" folder of the SDK to 'l=1250K'".


That's to change the executable ROM size. To change RAM size, it's "ram: l=64K" to "ram: l=500K" (the placement of the "ram:" may be wrong, but if you open up the file you'll get what I mean)
Thanks and congratulations for taking this step, Souvik. I fully agree with Merth's point of view.
If users do not want to risk having something "illegal"/less appropriate on their calculators, just don't install an image viewing add-in - it's not like these are born automatically on your calc, so when you install it in there it's your entire responsibility. Just like what happens with overclocking, games, the TXT viewing (draft) add-in, etc.

We are arguing about "ethics" (!) of having an image viewer on the Prizm even though I'm sure most people don't even know exactly why Casio doesn't seem to want G3P files open in a CG10 (I'm one of those). And again, we are not working to have G3P view-able on a CG10, but working on displaying other image formats. So the original restriction of not being able to read unprotected G3P is still there.

Furthermore: it's not like add-ins are secret things, at least of now (as long as there's no custom shell for the Prizm). Any teacher/parent can delete the add-in from the calculator or even reset all the add-ins to the default ones using the Reset Menu. (and that's why faking the reset menu brings a whole another, and mostly unrelated to image viewing, set of ethical questions)

I think it's now time to keep working on my on-calc PNG image viewer (since PNGs take way less space than a BMP or a special converted format). Those who don't want it because of "ethics", should just not install it. And I'll make sure to add a warning to it when the add-in is running on a CG10 so the user must know what it is doing.
The reason why Casio blocked image viewing on the g10 is because the calculator would not have been allowed in American exams and tests. If image viewing or a custom image viewer was made possible on that model, then it would get banned from schools, hurting Casio sales. I believe this was stated many times before in this sub-forum.

IMHO, schools should just revert back to the good ol' mem clear like back in the days. Sure, it's annoying to lose stuff, but people have to learn to backup and I would rather see my calc resetted (or disallowed if a fake reset is found) than being upgraded to a newer OS or restricted without my permission.

Anyway people are free to make whatever they want for any calculator model, even fake reset programs if they want to. I myself would LOVE to get them on my calc! It's just that if this causes Casio to retaliate with an endless war against 3rd party dev like TI is doing, then we will have been warned.
DJ_O wrote:
The reason why Casio blocked image viewing on the g10 is because the calculator would not have been allowed in American exams and tests. If image viewing or a custom image viewer was made possible on that model, then it would get banned from schools, hurting Casio sales. I believe this was stated many times before in this sub-forum.
Are we sure that it would be banned on tests just because of image support? The Nspire allows it, and it's allowed pretty much everywhere. I would understand if Casio would be unhappy if it would be possible, but I don't think it would be automatically banned if it supported images.
I've made a lot of improvements to my add-in, and now it renders images much faster. It also handles two byte dimensions properly, so you can display much larger pictures. The link in the first post points to the new version. For the next version, I want to make some kind of file input box where you can input the filename of an image to display.
Is the converter any different?
I updated the converter to get rid of the warning message with two-byte sizes, but the old version should still work.
JosJuice wrote:
DJ_O wrote:
The reason why Casio blocked image viewing on the g10 is because the calculator would not have been allowed in American exams and tests. If image viewing or a custom image viewer was made possible on that model, then it would get banned from schools, hurting Casio sales. I believe this was stated many times before in this sub-forum.
Are we sure that it would be banned on tests just because of image support? The Nspire allows it, and it's allowed pretty much everywhere. I would understand if Casio would be unhappy if it would be possible, but I don't think it would be automatically banned if it supported images.
It's not an issue of being banned on tests at all. It's an issue of Casio deciding that what we're doing threatens its acceptance on standardized tests, and taking steps to lock down the Prizm to anything even remotely approaching Nspire levels.

Souvik, great progress! I'll probably continue to nag you to have it read and understand standard bitmap headers. Wink
The links in the first post are updated for the new version, which lets you input filenames so that you can have more than one picture on your calculator.
KermMartian wrote:
JosJuice wrote:
DJ_O wrote:
The reason why Casio blocked image viewing on the g10 is because the calculator would not have been allowed in American exams and tests. If image viewing or a custom image viewer was made possible on that model, then it would get banned from schools, hurting Casio sales. I believe this was stated many times before in this sub-forum.
Are we sure that it would be banned on tests just because of image support? The Nspire allows it, and it's allowed pretty much everywhere. I would understand if Casio would be unhappy if it would be possible, but I don't think it would be automatically banned if it supported images.
It's not an issue of being banned on tests at all. It's an issue of Casio deciding that what we're doing threatens its acceptance on standardized tests, and taking steps to lock down the Prizm to anything even remotely approaching Nspire levels.

Souvik, great progress! I'll probably continue to nag you to have it read and understand standard bitmap headers. Wink

Thanks. Smile I'll try to work on that after my AP test and other school related stuff are over, since I'm going to be really busy in the next couple of weeks.
I'd volunteer to have a go at implementing that, even. Smile

In any case, you might find mkg3a's bmp loader useful.
Tari wrote:
I'd volunteer to have a go at implementing that, even. Smile

In any case, you might find mkg3a's bmp loader useful.

Thanks. I'm sure I'll find that useful. Also, here is the Cemetech archives download link:
http://www.cemetech.net/programs/index.php?mode=file&id=742
Tari wrote:
I'd volunteer to have a go at implementing that, even. Smile

In any case, you might find mkg3a's bmp loader useful.
No arguments here, I'm sure you'd do a great job. Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement