I basically finished the converter, it's a lot nicer than my old one in every way. The code is a lot neater, and it has many more functions. It will warn you if you're converting an image that probably wont fit on the calculator without resizing it. It can also log events and tell you what went wrong if conversion failed. Most importantly: it now cleans up after itself! It does this by deleting the dozens of unnecessary files convpng creates, then it stores all the converted appvars in a named folder!

Just for fun, I gave the program a 300MB picture to convert. It actually converted the image into 26,000 files and successfully cleaned up the useless ones!

This took quite a long time to implement due to my program not being authorized to create or modify images in some directories, even if they're directories the program itself made. Rolling Eyes

I have the code up on github here: https://github.com/TheLastMillennial/HDPictureViewerConverter2 I didn't include convpng if you download the project yet so you can't really use it right now. I also haven't bothered to create a readme yet since there isn't anything that can utilize this converter. I'll get to including those soon though!

So the easy part is done now. Now I need to get cracking at C.
Well, it's a start full of bugs, debugs, and an absent palette! Laughing

Yeah it looks pretty ugly now because the wrong palette is being used. These were the images it was trying to display:

It's the first time I got my program to display any image at all so I'm pretty excited! There's lots more I have to fix, add, and refine but I'm happy it's coming together mostly smoothly!

Heck yeah, I fixed it! Rendering is a bit slow right now but I'm sure I can speed that up significantly.
Is there a pic converter for macOS?
BioHazard wrote:
Is there a pic converter for macOS?

Sort of. If you want to use the easy converter then you'll have to use Wine. Otherwise you'll have to convert it manually using convPNG. In my first post I have a tutorial that covers manual conversion.

EDIT: I suppose I should add a progress update even though there hasn't been any recent work on it. A few weeks ago Jacobly helped me out a ton to get larger images down mostly correctly! I've broken something else because smaller images are being displayed too big now though. I wont have much time to work on it in the near future but this is still on my todo list!
I can't install Wine because it needs x Quartz, then that needs admin privileges, which I don't have; so Wine is off the table.

I found out that the program doesn't work on my calculator (TI-84 plus CE-T python edition).
Is there gonna be an new version of the picture viewer soon?
If you're getting an ERR:INVALID, that's an issue with your OS, not the program itself. TI disabled all assembly programs from running in the latest OS versions.
I have a tutorial for bypassing this. It's mainly for games, but also works with other programs too:
Well, I had a bit of time over break to implement or fix rudimentary versions of the most important features. Image scaling, missing sub-image handling, zooming in and out, and panning around; finally this project looks like it's coming together!

Thanks to Jacobly, image scaling now works perfectly so I can throw whatever dimensions I want at the image, and the program figures out how to resize it accordingly! This is tied with zooming in and out of images which works pretty well so far. There's no protection against zooming in or out too far yet but I'm just glad it's working at all!

Panning around images is super janky currently since it's the latest thing I implemented and I haven't spent much time on it. It works well panning left and right so I'll show that with the space image in the screenshot below. Changing gears here; since each image is really just a bunch of sub-images combined to make one bigger one, there's a chance that one of those smaller images could get deleted. Instead of allowing unmapped memory to display, or stopping the image from loading entirely, I added a small sprite which goes in place of the missing sub-image. This works pretty well and you can see them when I accidentally break the program while panning around the puppy image.

There's a lot of work to be done to polish these features I implemented. Krytonic already offered some great suggestions like instead of re-drawing the whole image when panning, just shift the screen over and draw the sub-images I need. This should significantly improve speed with large images. Also, instead of allowing pictures on the edge of the screen to overflow, just clip the images on the edge of the screen. Unfortunately, I have no idea next time I'll be able to work on this but I'm pretty happy with what I've accomplished in the past few days. I'm really looking forward to being able to complete this project!
I was notified today that, due to Mac shenanigans, my old 32 bit converter didn't work through Wine anymore. Unfortunately, my Visual Studio solution was deleted (that's the reason I started a re-write) but I found an old .cs file on Github so I was able to re-create and compile it. It's now a 64 bit application and I've pushed a new release with it: https://github.com/TheLastMillennial/HD-Picture-Viewer/releases
Does anyone know how to get passed the _iny.cc/libs error?
Try going to tiny.cc/clibs and downloading the libraries.
I found some free time and finished a pretty big update for HDPIC Version 2: I got deleting images to work! Finally, I won't have to manually remove each sub-image via the memory management menu.

Panning images works as expected now albeit extremely slowly. It didn't realize the math to figure out what sub-images to show would be so difficult! I just want to finish my minimum viable product so speed can suffer while I figure out the math.

Note: I edited out the biggest loading times in the gif to highlight the amount of detail you can get when zoomed in. The gif zooms into the top left corner.

The program isn't polished enough to fully release it but you can try out a working version on Github
You can convert the images using the new converter also from Github
After 3 years, I've finally pushed out the first significant update! The program is now in a pre-release alpha state you can download!

The math for determining which sub-images to display while panning around images was holding me back, but I sat down yesterday, grabbed some paper, and hammered out the formula which was actually simpler than I expected. This improved performance by an order of magnitude!

  //This calculates the number of squares you can fit in the screen horizontally
  //we know the horizontal resolution of the screen is 320px.
  //We can get the width of each square by doing newWidthHeight/scaleDen
  //the +1 is to account for rounding down errors. We don't want missing squares.
  int24_t rightMostSquare = 320/(newWidthHeight/scaleDen)+1;
I know it's not good to store a decimal answer to an int, but that's something I'll look at in the future.

As you know, the code is re-written in C. There's also no longer any restrictions on how large an image can be. Here's some results I got with different resolutions.

The initial image is a native 320x240 image which looks the best, unless you try to zoom in.
The next image that takes a bit to render is a 1080p image. I think it loads in a reasonable time, and it performs really well when you zoom in and pan around! It doesn't look quite as good as 320x240 image when it's fit to the screen size, but I'm still happy with the quality!

Here I pushed the storage to its limits by trying to fit a 4K image on it. The error symbols are the squares that couldn't fit on the calculator. I was surprised by the fidelity it kept!

Some fun facts:
  • This is all without compressing the pictures so the file sizes are still very large. However, you can still fit more images on the calculator total because you can fit more than half an image per flash page!
  • The program is 14.6kb and needs about 30kb of free RAM to run. The program itself is also not compressed right now.
  • The 1080p image of the puppy uses 253 .8xv files.

Since there's so many files, the program can now cleanly delete the pictures for you. Pressing [del] will immediately delete the currently viewed image.

There's also a new converter!

Download the Alpha:
  • If you want to try the viewer, just download the new HD Picture Viewer Converter to create the .8xv files. Refer to the readme for instructions on how to use it.
  • Then download and send the HD Picture Viewer to your calculator. Once you run the program, it will detect any images currently on the calculator and display them. Use [y=] and [graph] to switch images. Arrow keys to pan. [+] and [-] to zoom in and out. Press [zoom] to reset the zoom and pan. [clear] to exit.

Future plans:
  • The biggest change I'd like to implement is compression. If each image is compressed, then I expect I'll be able to fit a 4k image onto the calculator without losing visual fidelity.
  • I may add a button that immediately zooms in as far as possible.
  • After that, I'd like to clean up the code. If fixed all applicable warnings the compiler gave me, but there's still more work to do.
Remember, the programs are in Alpha state! Make a post here telling me what bugs you find or thoughts you have!
Nice work!

I notice that you are still using 8bpp - any thoughts on using compressed 16bpp to get better image quality as well?
That sounds fantastic! A few questions:
1. I don't see 16bpp mentioned in the convimg readme, is using 16bpp as easy as doing `bpp: 16` in the yaml file?
2. How much larger is the palette than 8bpp?
3. If I use 16bpp how do I account for gfx_begin() which I believe switches the screen to 8bpp? I assume it switches to 8bpp since gfx_end() switches back to 16bpp.
You have to write all the routines yourself. You should make an issue in convimg about adding 16 bpp support
You should make a github page to convert the images so people who cant download and run the program can convert images.
Invalid_Jake wrote:
You should make a github page to convert the images so people who cant download and run the program can convert images.
I'd like to, but it's out of the scope of the project for now. Not only would I have to redesign my converter for the new platform, but I'd also need to port convimg to the new platform as well. While I'm sure it's doable, I simply don't have enough time to invest in such a redesign. I haven't been able to test myself, but Wine may work with the converter.
Ya, I use wine for the converter. and it works fine
I started some preliminary work implementing compression. I'm using an older version of convimg so I'm testing with just zx7 compression instead of the better zx0 compression. Right off the bat, I've notice a massive improvement in file sizes. Instead of every appvar being ~7kb, they're now typically just 2kb-4kb. This results in the final image being 40%-60% smaller! Even better, there's zero difference in quality!

Think you can tell a difference? Try and guess which is compressed and which isn't:

Answers: Left is compressed. Right isn't compressed.

Here's the compression size difference for a 2160x1440 image:

Left is not compressed, right is compressed
3mb down to 1.16mb is 61% smaller! The image will easily fit on the calculator now.

convimg has two options for compressing. You can compress the image itself, or the appvar. I'm not sure which is suppose to be better since they output nearly identical file sizes (only 22 bytes difference). I do know that compressing both the image and the appvar results in a larger file size. Not sure why, but I'll definitely avoid doing that!

Here's the compression size difference for a 320x240 image:

From left to right: No compression, compress image only, compress appvar only, compress both image and appvar.
76.6kb down to 43.9kb gives us a 43% smaller file size!

I wasn't expecting such a huge difference so this gets me excited. Once I update convimg I'll do a comparison between zx7 and zx0 compression!
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
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Page 8 of 9
» 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