Why not splitting it into 2 appvars of 160x240 to get a real full-resolution image? Smile
I think the square is the option. Having it 255x240 means that there will need to be 32.5 pixels on each side. So the image would be 1 pixel to the right or left of perfect... probably won't be noticeable but its still not even.

EDIT: I did not see PT_'s post hidden on page 2. I think PT_'s idea is the best. Having it like that would mean you could use the full screen.
PT_ wrote:
Why not splitting it into 2 appvars of 160x240 to get a real full-resolution image? Smile

I'm trying to make this as user friendly as possible, you can't fit 320x240 information into a single app var and splitting an image, while trivial for many people, will confuse the average person.

Thank you for all your responses! Here's what I'm thinking I'm going to do:
I'm going to allow easy support for 240x240 images, but any larger than that, I'll also provide a slightly more complex way get a full screen. Smile
Just a this-project-isn't-dead post.

I was finally able to work on this again but my code isn't working, it cant find my app var for some reason, so I'm having god PT_ take a look at it to see if it's my shoddy ICE skills or if it's a problem with ICE. (probably the former Laughing)

EDIT: Yup, I was right, it was my fault! I was using the output from the DetectVar( command as a slot when it was actually a pointer. Rolling Eyes
Thanks again PT_!
When this is all figured out, could you make a video tutorial showing how a normal person with no skill can do this?
21tmccauley wrote:
When this is all figured out, could you make a video tutorial showing how a normal person with no skill can do this?


As in how to make the program, or how to use the program? If you mean how to make the program, this is basically how it works. You take your image that you want to display on your calculator, and convert it to ICE sprite data in an appvar using ConvPNG made by Mateo. The readme from that should tell you how to do that, and what to export it as. Then you make your program read from the appvar, which is now full of the image as sprite data, and it will display that image as a sprite. You can split up the image into 2 parts or more for better quality, but for it to be simple, you can just display it as one image. Hope this explains it! If this doesn't TLM is a GREAT youtuber. He'll make a great video, if you need it.

Iambian on IRC wrote:
11:06:29 PM <Iambian> As long as the image can compress under 64KB, you should be able to display a full 320x240 image in one shot.
jcgter777 wrote:
21tmccauley wrote:
When this is all figured out, could you make a video tutorial showing how a normal person with no skill can do this?


As in how to make the program, or how to use the program? If you mean how to make the program, this is basically how it works. You take your image that you want to display on your calculator, and convert it to ICE sprite data in an appvar using ConvPNG made by Mateo. The readme from that should tell you how to do that, and what to export it as. Then you make your program read from the appvar, which is now full of the image as sprite data, and it will display that image as a sprite. You can split up the image into 2 parts or more for better quality, but for it to be simple, you can just display it as one image. Hope this explains it! If this doesn't TLM is a GREAT youtuber. He'll make a great video, if you need it.

Iambian on IRC wrote:
11:06:29 PM <Iambian> As long as the image can compress under 64KB, you should be able to display a full 320x240 image in one shot.

Thanks for the explanation. I think I understand now!
Another project bump. My biggest problem is I can't seem to properly open up my app var. And even though I have the DetectVar( command set to only search AppVars, it keeps detecting my program too. I'm releasing this source code and the AppVar in hopes someone (probably PT_ Razz) can enlighten me what's going wrong with my opening code.
Cake AppVar[link redacted]
HDPic2 Code [link redacted]
It can't get project from server @TheLastMillennial
With some a lot of help from PT_, I am proud to present the first image, well half and image, displayed by this program!

It's suppose to look like:

As you can clearly see, the part of the cake that was displayed is on the wrong side of the screen and the colors are completely messed up. I'll be working on fixing that.
Well it doesn't look like it's too far off the mark - is there any kind of double buffering involved or are you able to double check where you are starting to draw to in VRAM?
tr1p1ea wrote:
Well it doesn't look like it's too far off the mark - is there any kind of double buffering involved or are you able to double check where you are starting to draw to in VRAM?

Um, I don't even understand half my code, let alone know where I started drawing. Razz
I got the image on the correct side now though. There is no double buffering right now, I'm only using one buffer. I'm taking the data for one side (160x240) and storing it into a sprite then displaying it at point 0,0 then I'm taking the other side (same size), storing it to a different sprite, and displaying it at 160,0. I hope that answered your question.
Better code Smile


Code:
[i]OUTPUT
0->APOS
Begin
While Detect(^^oAPOS,"HDPICV2L"->APROG
   CloseAll
   Open(APROG,"r->ASLOT
   0->BPOS
   While Detect(^^oBPOS,"HDPICV2R"->BPROG
      Open(BPROG,"r->BSLOT
      Seek(8,0,ASLOT
      Seek(8,0,BSLOT
      For(CHAR,0,7
         If GetChar(ASLOT)!=GetChar(BSLOT
            Goto WRONGONE
         End
      End
      Sprite_NoClip(GetDataPtr(ASLOT),0,0
      Sprite_NoClip(GetDataPtr(BSLOT),160,0
      Pause
      1->BPOS
      Lbl WRONGONE
   End
End
det(1
I'll have to modify that code for it to work the way I need it to, but I'm glad the code works!
Could you please explain how

Code:
For(CHAR,0,7
         If GetChar(ASLOT)!=GetChar(BSLOT
            Goto WRONGONE
         End
      End

works? It looks like you're comparing the characters in the slot at the place you seeked to, but wouldn't this code compare the same letter since I don't see CHAR being used anywhere inside the For( loop? Also, wouldn't that Goto create a memory leak? (I don't remember if that's possible in ICE)
Another thing, shouldn't that 1->BPOS be 0->BPOS since you want to start searching at the beginning again?
OK, now that I've got the ICE part working, I'm working on the PC side which will allow you to pretty much drag and drop an image onto the .exe then it'll resize, split the image, make the .ini file, and run convPNG for you!
Done:
Splitting the image
Saving the images
making the .ini file
Make sure the image name is correct length for app var
running convPNG

Working on:
Resizing


Todo:
Cool
Or you could just use convpng like a library and link against it like a normal person would... Guess I'll have to add that so you can have a nice .a or .dll or whatever eventually.
Ok, so I'm having a few issues.
So my C# program is working very well, except when it tries to run windows_convpng.exe . For some reason it can't find the .ini file even though it's in the same folder? When I run it without my program it works perfectly so I don't understand what's wrong. Perhaps someone can help me with it? Iambian helped me! I had my .ini file and pictures in the wrong folder.

Code:
        private void SaveCreate()
        {
            //gets directory of this program
            AppDir = AppDomain.CurrentDomain.BaseDirectory;
            //debugging, doesn't effect the program
            Console.WriteLine("Dir: "+AppDir);
            //saves the pictures as pngs
            LeftPictureBox.Image.Save(AppDir + @"Left.png", ImageFormat.Png);
            RightPictureBox.Image.Save(AppDir + @"Right.png", ImageFormat.Png);
            //makes sure file name is correct length
            FilenameEight = Filename;
            //I have this as 7 for the app var name allowing a L or R to be placed at the end
            if (Filename.Length > 7)
                Filename = Filename.Substring(0, 7);
            //I have this as 8 for the header
            if (FilenameEight.Length > 8)
            {
                FilenameEight = FilenameEight.Substring(0, 8);
            }
            else
            {
                //This loops until the header is 8 chars long
                while (Filename.Length < 8)
                {
                    Filename = Filename + "_";
                }
            }
            //left picture ini file
            string[] iniLines = { "/Leave this alone"
                    , "#GroupICE          : all_gfx"
                    , "/Leave this alone"
                    ,"#Palette           : xlibc"
                    ,"/image name"
                    ,"#PNGImages         :"
                    ,"Left"
                    ,"/name of your output app var"
                    ,"#AppvarICE         : "+Filename+"L"
                    ,"#OutputHeader      : HDPICV2L"+FilenameEight
                    ,"/same image name as above"
                    ,"#PNGImages         :"
                    ," Left"};
            //saves the ini text and runs convpng
            System.IO.File.WriteAllLines(AppDir+@"convpng.ini", iniLines);
            Process.Start(AppDir + @"windows_convpng.exe");
            //right picture ini file
            string[] iniLinesB = { "/Leave this alone"
                    , "#GroupICE          : all_gfx"
                    , "/Leave this alone"
                    ,"#Palette           : xlibc"
                    ,"/image name"
                    ,"#PNGImages         :"
                    ,"Right"
                    ,"/name of your output app var"
                    ,"#AppvarICE         : "+Filename+"R"
                    ,"#OutputHeader      : HDPICV2R"+FilenameEight
                    ,"/same image name as above"
                    ,"#PNGImages         :"
                    ," Right"};
            //saves the ini text and runs convpng
            System.IO.File.WriteAllLines(AppDir + @"convpng.ini", iniLinesB);
            Process.Start(AppDir + @"windows_convpng.exe");

        }
(If you notice optimizations, (I know there are several) please point them out to me.)


Another issue I'm having is with the ICE code, it's only finding one image before it decides to quit, I'm not sure how to make it keep searching. I know my new images work because if I delete all other images with that header it finds it; but if there are more than one image on the calc, it only finds one.
Ok, so I think I've got the PC side of things done, my C# code was made unusually smoothly, maybe I'm actually getting good at it? Razz
Here's a quick video of it. Windows Screen Recorder doesn't record the popup windows so it may be hard to understand what's going on.
The open file button brings up the window that allows you to select an image to be converted.
The open folder button brings up a separate windows at the location of all the saved app vars.
Also, yes I know I had the wrong extension on the file names, I've fixed that already.

The colored rectangles are where my picture boxes are, I'll be making those invisible when I release it.
EDIT: My program saves the app vars with the first 7 characters of the original picture file name.

I'm going to be working on the Calculator side again. I forgot I needed to store the pointers of each picture to a list and recall them later. I'll also be making a cool interface that'll look just a tiny bit like BOSShell. Smile
TheLastMillennial wrote:
Ok, so I think I've got the PC side of things done, my C# code was made unusually smoothly, maybe I'm actually getting good at it? Razz
Here's a quick video of it. Windows Screen Recorder doesn't record the popup windows so it may be hard to understand what's going on.
The open file button brings up the window that allows you to select an image to be converted.
The open folder button brings up a separate windows at the location of all the saved app vars.
Also, yes I know I had the wrong extension on the file names, I've fixed that already.

The colored rectangles are where my picture boxes are, I'll be making those invisible when I release it.
EDIT: My program saves the app vars with the first 7 characters of the original picture file name.

I'm going to be working on the Calculator side again. I forgot I needed to store the pointers of each picture to a list and recall them later. I'll also be making a cool interface that'll look just a tiny bit like BOSShell. Smile


Cool Very Happy
maybe you'd like to incorporate it?
Why are you splitting this into two images with two appvars. Just use one.
  
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 2 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