CURTIS@UREGINAV.BITNET (02/01/90)
hello! I have recently written a program to read iff files using the standard IFF chunks, and for full sized pictures, it works fine. Yet, I now have a need for viewing and manipulating IFF bobs and brushes, and for these pictures, the size (width &height) are normally smaller than the standard screen size for the particular resolution in which they are drawn. Therefore, I have no way of determining the correct resolution these brushes are supposed to be drawn in. Does anyone out there know how to find the correct resolution inside each IFF bob file? I tried searching for the CAMG chunk, but none of the iff files I have, have this chunk in them! Any help would be greatly appreciated! thanks, CURTIS@UREGINAV
svermeulen@JANUS.MTROYAL.AB.CA (02/02/90)
Curtis, regarding the correct resolution for brushes... If you look at the BMHD chunk you will find that there is both a size for the image and a "source page" size. The size for the image is in BMHD.w and BMHD.h while the source page size is in BMHD.pageWidth and BMHD.pageHeight. Paint programs put the current SCREEN DIMENSIONS into the pageWidth and pageHeight fields and the actual pixel dimensions of the picture into w and h. You can also try to make use of the xAspect and yAspect settings too if you want. Regards, Stephen Vermeulen PO Box 3295 Author: Express Paint, Spritz and Fusion Paint Station B Newsletter Editor of AMUC (the AMiga Users of Calgary) Calgary, Alberta SVermeulen % Janus.MtRoyal.AB.CA @ UncaNet.BITnet ...or... CANADA SVermeulen % Janus.MRC.AdhocNet.CA @ UncaEdu.BITnet T2M 4L8
KENNEDY%WWPACS@DUPONT.COM (Tony Kennedy) (02/02/90)
>>hello! >> I have recently written a program to read iff files using the standard >>IFF chunks, and for full sized pictures, it works fine. Yet, I now have a >>need for viewing and manipulating IFF bobs and brushes, and for these pictures, >>the size (width &height) are normally smaller than the standard screen size for >>the particular resolution in which they are drawn. Therefore, I have no way >>of determining the correct resolution these brushes are supposed to be drawn >>in. Does anyone out there know how to find the correct resolution inside each >>IFF bob file? I tried searching for the CAMG chunk, but none of the iff files >>I have, have this chunk in them! Any help would be greatly appreciated! Yeah, I ran into the same problem. You need to use the Xaspect and Yaspect fields from the bitmap header. I can't remember what values they are (it's the Advanced System Programmers Guide from Abacus) 'cause I'm at work. But I can look them up tonight if you still need them. >>thanks, No sweat. :^) >>CURTIS@UREGINAV ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tony Kennedy I know that you believe you understand what Setpoint Inc what you think I said, but I'm not sure (304)863-2903 you realize that what you heard is not what I meant. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KENNEDY%WWPACS@DUPONT.COM (Tony Kennedy) (02/02/90)
>>and a "source page" size. The size for the image is in BMHD.w and BMHD.h >>while the source page size is in BMHD.pageWidth and BMHD.pageHeight. If you use these don't forget about all the stuff that's done in overscan. I've run into a few IFF files that have *strange* width and heights. Specifically the Neptune pictures. And don't forget about PAL... >>into w and h. You can also try to make use of the xAspect and yAspect >>settings too if you want. I'd go for that first, as per my previous message. >>Regards, >>Stephen Vermeulen PO Box 3295 >>Author: Express Paint, Spritz and Fusion Paint Station B P.S. You write good stuff Steve...:^) ...Tony
CURTIS@UREGINAV.BITNET (02/02/90)
Hello! I would like to thank you for your help with the IFF files. It was indeed what I was looking for. However, I seemed to have encountered a more fundamental problem in my program which I have yet to understand. How and where should I decode my bob? It seems that if I decode my bob into the same memory as my screen, I get about 20 copies of the same picture in the screen memory! Should I load the bob into a separate buffer and then use the blitter to copy it into screen bitmap? The purpose of all my efforts is to be able to load a brush that I created with Dpaint, put it into a bob, then be able to move, manipulate and animate these pictures. I thought it seemed straightforward, but so far, my results are discouraging me! I think its great that guys like Steve V and others are willing to share their knowledge with guys like me who are just learning and struggling! thanks again for all your help, Curtis@ureginav
svermeulen@JANUS.MTROYAL.AB.CA (02/03/90)
Curtis, once you have allocated a screen that is larger that your bob you should have no problems decodeing the bob in that screen (so long as you are not worried about the previous contents of the screen). Have you remembered to skip the blank portion of the screen (the unused pixels in the width which the bob is not wide enough to cover) before proceeding to decode the next row of the bob? Have you allocated the correct number of bitplanes in the screen to hold all those in the bob? And have you remembered about the TRANSPARANCY MASK bitplane that is also present in the bob. In fact most IFF brushes will have N+1 bitplanes because of this, but don't always do it because its also possible to save non-standard picture sizes which might be as small as a bob but which don't have the mask. You might find it conceptually simpler to allocate a 1 pixel high bitplane and raster port N+1 bitplanes deep and decode one row of the bob at a time into it and then use ClipBlit() to put the result anywhere you want on the screen. Regards, Stephen Vermeulen PO Box 3295 Author: Express Paint, Spritz and Fusion Paint Station B Newsletter Editor of AMUC (the AMiga Users of Calgary) Calgary, Alberta SVermeulen % Janus.MtRoyal.AB.CA @ UncaNet.BITnet ...or... CANADA SVermeulen % Janus.MRC.AdhocNet.CA @ UncaEdu.BITnet T2M 4L8