MFM1%LEHIGH.BITNET@ibm1.cc.lehigh.edu (mark masters) (05/31/89)
Okay, I've a question on how one could zoom in on a section of an IFF picture from within a program. That is to say I've been working on an animation program, and I need to zoom in on a picture which has been loaded into memory and I have no Idea on how to change its size. Any help will be tremendously, incredibly, hugely appreciated. mark <mfm1@lehigh>
baer@percival.UUCP (Ken Baer) (05/31/89)
In article <16520@louie.udel.EDU> MFM1%LEHIGH.BITNET@ibm1.cc.lehigh.edu (mark masters) writes: >Okay, I've a question on how one could zoom in on a section of an IFF >picture from within a program. That is to say I've been working on an >animation program, and I need to zoom in on a picture which has been >loaded into memory Sounds like you're trying to re-write Animation:Stand. Are you planning to do image processing to improve the quality of the zoomed image? You will probably want to use some kind of buffer. You will expand the image as you copy it into the buffer. The image processing gets pretty complicated after that. >mark ><mfm1@lehigh> -- -Ken Baer. // Hash Enterprises: Choosy Toons Choose Hash. \X/ USENET - baer@percival.UUCP, PLINK - KEN BAER, BIX - kbaer, "while (AINTGOTNOSATISFACTION) { do stuff }" - RJ Mical
ccemdd@rivm.UUCP (Marco Dedecker) (06/01/89)
In article <16520@louie.udel.EDU>, MFM1%LEHIGH.BITNET@ibm1.cc.lehigh.edu (mark masters) writes: > > > Okay, I've a question on how one could zoom in on a section of an IFF > picture from within a program. That is to say I've been working on an > animation program, and I need to zoom in on a picture which has been > loaded into memory and I have no Idea on how to change its size. Any > help will be tremendously, incredibly, hugely appreciated. > > mark > <mfm1@lehigh> Well actually, you can change the size of it, but by doing that you won't zoom in. If you want to zoom in you have to calculate a new screen. In order to do this you have to know where you can find the bitmaps of your IFF picture. Suppose : - You have a picture 320*200, 5 bitplanes (32 colors). - You wish to zoom in a screen of lets say 160*100 (1/4 of the screen). - You wish to zoom in on the upper left corner (where X is). (0,0) (160,0) (320,0) X (0,100) (160,100) (320,100) (0,200) (160,200) (320,200) What do you do : - You define a second screen (320*200, 5 bitplanes). - You take the 1st bit from the first line of your original picture, and you display it twice on the first line of the new screen. - After one line is done you duplicate the first line of the new picture to the second line of the new picture. Example : The 1st byte of your picture : 10101100 On the new picture it will become : 1100110011110000 1100110011110000 Keep in mind that if you are using this methode it will eat A LOT of CPU time. You could try creating the new picture in fases (one bitplane every vblank). You might also try using the blitter to create the new picture. I don't know if this is what you had in mind, but I hope it will be of some help. Marco Dedecker