Woohoo! Congrats TheLastMillenial. I know you've run through a few obstacles, and I'm super excited that you have gotten this far and released a beta. Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy
Small update, but I added a Cesium icon and a description! I've also updated the example image, with the wrong image... but oh well, the one I accidentally uploaded doesn't look too shabby! I'll make a note to change it to the correct image next time! Here's the new version.
I finally decided to buckle down and fix my C# code, and I did manage to salvage the code so at least it works for me! Unfortunately I can't seem to get a working version on github but that's a problem for another time.
Thanks to Mateo, I also updated how the ini file works. Now you can convert the left and right image in one ini file! You can also make the palette in the same ini. I'm not sure I'm doing the palette part correctly, but I haven't been able to test that because my on-calc code refuses to detect any images now that I've tried to add custom palette support. I may need help fixing that. Out of the broken detection system, I also added a useful warning that notifies you if it didn't detect any images!

Here's what the old viewer sees the custom palette images as: (Custom on left, old on right)


Finals are coming up for me, so expect the same amount of updates on this. (by this I mean, very few : P)
This looks absolutely great! It's ok if finals are keeping you from updating. I have finals too. (AP Physics finna kill me.) Sad
That looks a little funky Razz Where's your code?
For some reason SC hates me and refuses to export my code, I've tried deleting the spaces, even re writing the entire line but it still won't work. Anyways, I've updated just the source of my github with the current version, but here's the SC version. Look at tab 'HDPIC 5'
Line 104: Like 3 tabs after the end. Find where SC is complaining (SC line # != site line #'s, idk why), look up and down.
SM84CE++ that was it! Once that was sorted out I quickly found out that my detection issue was because I forgot to set the search pointer initially to 0 before searching.

It's almost finished! The images show up and they look spectacular!!!
Old-New-Original


I'm super hyped, the program's almost ready for a full version 1 release! There's a few graphic bugs I want to clean up but it shouldn't take long. (only a few years max) Razz
I've said this before, but thank you to everyone who contributed to this project, I never would've made it without out you!
Nice! As for a release version, I would recommend an easier way to convert images in batch. I would like to use this with quite a few pictures.
JWinslow23 wrote:
Nice! As for a release version, I would recommend an easier way to convert images in batch. I would like to use this with quite a few pictures.

Good idea. The Windows converter works well and is pretty quick at converting each image, I'll look into multiple image selection though!

On the subject of the converter, could someone help me figure out how I can get my C# code compatible with Mac and Linux without needing to acquire a machine that can run those OSes? If it comes to it, I have access to them, but it'd be way easier if I could just make the code compatible using my Windows 10 machine.
Looking pretty neat! Also if you wrote your program in C# using the .NET framework, your program should already be cross platform with mono. Then learn to program in something that isn't as crappy as Microsoft.
Good to know, thanks for the information Mateo!

I made a quick video to hype up some more publicity for this project!
Would it be possible to make an on-calc converter? Maybe take an background image downloaded to the calculator and converting it to an appvar of some sorts?
The point of this project was to avoid the compression that ti-os does when you send it as a picture, so that would defeat the purpose
To elaborate on what john said, when you send a picture as a background image to the calculator, TI Connect automatically compresses the image to the awful quality. There's no way I can improve the picture quality after it has been sent to the calculator; and there's obviously no point in spending a bunch of time on an on-calc converter that won't improve quality. Smile
this looks great!
Pasting here for reference:

Quote:
20:30 <MateoC> Each pixel is given 3 color components, known as red (R), green (G), and blue (B)
20:30 <saxjax> [TheLastMillennial] right
20:30 <MateoC> On the CE, these are derived from a palette. An image has a palette, and the screen has a different palette.
20:30 <MateoC> What we want to do is make the colors in the image palette match as close as possible to the screen palette
20:31 <MateoC> This is so the colors look good when different images are using different palettes
20:31 <MateoC> In your case, the xlib palette is the screen palette
20:32 <MateoC> Now, for every pixel in the image, we grab the palette entry associated with it
20:32 <MateoC> Images are stored in bytes, so if a byte is 2, it means it is using entry 2 of the palette (starting from 0)
20:32 <MateoC> Palette entries are 16 bits, formatted as 1555
20:33 <MateoC> This means that 1 bit green, 5 bits red, 5 bits green, 5 bits blue
20:33 <Runer112> (that's not what it's supposed to mean, but that's what it does mean for the CE)
20:33 <MateoC> The 1 bit green actually is a part of the 5 bits green, resulting in a 565 r,g,b color
20:34 <MateoC> So what we do is we get each component of red, blue, and green into variables. We'll call them R1, G1, B1
20:34 <saxjax> [Cemetech] commandblockguy entered the room
20:35 <MateoC> Now, we have to search the screen (xlib) palette for a color that matches best these R1, G1, B1 values
20:35 <MateoC> Starting at the first entry in the palette, we get the color components for the xlib color. We'll call this R2, G2, B2
20:36 <MateoC> Now, we use a fancy thing called the Euclidean distance between these two colors. It's a straightforward formula that looks like this:
20:37 <MateoC> sqrt((R1 - R2)^2 + (G1 - G2)^2 + (B1 - B2)^2)
20:38 <MateoC> Then we loop through the screen palette for every R2, G2, and B2 color, and whichever one results in the smallest Euclidean distance is the palette entry we use, and draw to the screen
20:39 <MateoC> So if the original image's pixel is 2, we rewrite it to the screen as a different value which matches the palette entry
20:39 <MateoC> Okay I'm done
20:40 <MateoC> Or you could just use the lazy way I suggested and just store a precoverted image thumbnail Razz
20:40 <MateoC> But I think the other way would be pretty neato


EDIT: As a side note, because ICE truncates the result of sqrt(), you will probably need to change the formula to look like this:


Code:
sqrt(((R1 - R2)^2 + (G1 - G2)^2 + (B1 - B2)^2)*1000) -> DISTANCE
Ok, so to clarify what Mateo posted, now that I've added custom palette support, my thumbnail routine wont work the way I had it before. It's going to be several days before I can focus on implementing the routine Mateo showed me so, I've decided to update the Github repository with my current code so now you can view those HD images! Somehow I broke image detection again, but it still kinda works.

Due to the better images, you'll need to re-convert all your images to work with the new update but I've finally added a computer converter so hopefully it'll aid you with converting! The .exe works for me, but please inform me if you encounter any issues with it!
I cant get the converter to work right.
It makes the pic1.xv but when I send it to my calc and run HDPICV there is no pic1
here is what the convpng.ini says:

/Leave this alone
#GroupICE : all_gfx
/Leave this alone
#Palette : xlibc

/image name
#PNGImages :
Test.png

/name of your output app var (maximum of 8 characters)
#AppvarICE :Pic1

/This will be at the very beginning of the app var (add underscores to the end to make the whole header 16 chars long)
/Never change the first 7 characters. Change the L to and R if you are converting the right half image rather than the left half
/The last 8 characters will be used as the image name in the program.
#OutputHeader : HDPICV2LRPic1___

/same image name as above
#PNGImages :
Test.png
I assume you're using the beta 2 release?

Thanks for sharing your ini file, I think I see your issues! I've bolded one of them. (I also see a typo on my part!)

So for this release of HDpic, it requires you to split your image into two images (a left half and a right half), each with separate file names (I typically just add a L or an R to the end of the file name so I know which half is which). You need to convert both images separately. For example, your Test.png should be split in to two halves, the left half should be saved to TestL.png and the right half to TestR.png

Here's another issue which I've bolded.
Quote:
/Leave this alone
#GroupICE : all_gfx
/Leave this alone
#Palette : xlibc

/image name
#PNGImages :
Test.png

/name of your output app var (maximum of 8 characters)
#AppvarICE :Pic1

/This will be at the very beginning of the app var (add underscores to the end to make the whole header 16 chars long)
/Never change the first 7 characters. Change the L to and R if you are converting the right half image rather than the left half
/The last 8 characters will be used as the image name in the program.
#OutputHeader : HDPICV2LRPic1___

/same image name as above
#PNGImages :
Test.png


You only use either an L or an R, never both at the same time. Also, since you need to convert the left and right images, you need two separate images with different file names, but the same header name. So the first time your run convpng, your ini file should look something like:
(I've also changed the picture filename)
Quote:
/Leave this alone
#GroupICE : all_gfx
/Leave this alone
#Palette : xlibc

/image name
#PNGImages :
TestL.png

/name of your output app var (maximum of 8 characters)
#AppvarICE :Pic1

/This will be at the very beginning of the app var (add underscores to the end to make the whole header 16 chars long)
/Never change the first 7 characters. Change the L to and R if you are converting the right half image rather than the left half
/The last 8 characters will be used as the image name in the program.
#OutputHeader : HDPICV2LPic1____

/same image name as above
#PNGImages :
TestL.png


Then you need to replace the L with an R so it looks something like:
(I've also changed the picture filename)
Quote:
/Leave this alone
#GroupICE : all_gfx
/Leave this alone
#Palette : xlibc

/image name
#PNGImages :
TestR.png

/name of your output app var (maximum of 8 characters)
#AppvarICE :Pic1

/This will be at the very beginning of the app var (add underscores to the end to make the whole header 16 chars long)
/Never change the first 7 characters. Change the L to and R if you are converting the right half image rather than the left half
/The last 8 characters will be used as the image name in the program.
#OutputHeader : HDPICV2RPic1____

/same image name as above
#PNGImages :
TestR.png

Then run convpng a second time so it converts the right half.

I also noticed that you didn't add enough underscores to the whole OutputHeader, make sure the header is 16 characters long in total (Not including the space in front of the HD)! Otherwise your image will show up wrong. (Boy, I can't wait to include a easy converter program in my next release.)

I just noticed my typo. When I said "Change the L to and R", that should actually say "Change the L to a R" sorry for the confusion!
  
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 5 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

 

Advertisement