A faster way to scale images? - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: A faster way to scale images? (/showthread.php?tid=1433) Pages:
1
2
|
RE: A faster way to scale images? - TerryRitchie - 02-16-2023 (02-16-2023, 08:28 AM)johannhowitzer Wrote: I tried some more tests, commenting various things out, moving stuff around, adding in extra calls, I hear ya. I've played around with hardware images in the past and wow are they fast. However, every single time I've tried implementing them into one of my software projects I've run across the same quirkiness you are describing. I'm working on a project now that would benefit greatly from hardware images so I'm going to give it another go. I may end up writing a new tutorial topic on just hardware images to help get everything straight in my own mind and have documentation on how exactly to implement them. RE: A faster way to scale images? - SMcNeill - 02-16-2023 I think the biggest issue you guys are having is in thinking of hardware images as being some sort of normal image. The reason why you don't have to specify which handle to put them on is because they only have one place where they can go -- the hardware layer. Our hardware layer is completely independent of any of our software layers. Think of it as being on a separate piece of paper completely. You draw on your software page, and then -- depending on your displayorder -- either lay that software page on top of the hardware page, or else lay the hardware page on top of the software page. Two distinct pages, and what you do to one has absolutely no effect on the other. Try this, for a mind opening example: Code: (Select All) tempScreen = _NEWIMAGE(200, 200, 32) 'a temp screen to draw a circle on Here I make a red circle and transform it into a hardware image. I then work with a SCREEN 0 text only screen.... and still display my graphics!! If that doesn't showcase that the two are completely separate layers, I don't know what'll show it any better! _DISPLAYORDER _SOFTWARE, _HARDWARE <-- change those as needed for what's on top on what's the base. And that's why _PUTIMAGE doesn't need any handle specified as to where to put a hardware image -- they all go to the _HARDWARE layer. RE: A faster way to scale images? - TerryRitchie - 02-16-2023 Thanks Steve. Between this explanation and the post you made a few months ago about hardware images I'm hoping to sort this out in my head. RE: A faster way to scale images? - johannhowitzer - 02-25-2023 So that's definitely a yes, hardware images will just always behave as if they went to SCREEN, no matter what DEST is set to. The additional info about DISPLAYORDER makes me wonder... in that case, why would a preceding DISPLAY stop a following PRINT statement from flickering once, then vanishing, when it was a part of the hardware image? Another question - if I only have DISPLAYORDER HARDWARE, will there be a black screen due to some weirdness like QB64 assuming something about the SOFTWARE side of things? In light of the flicker, it seems like DISPLAY does have some unusual interaction. I will run plenty of tests on all this as I have time, there is now a need for me to understand hardware images as well, and I'll try to answer these questions myself either way, but any extra light you can shed will likely speed this process up! |