CompuServe Thread

#How to get Image in?

11 messages in this thread
#37779From: Wayne ColeNov 18, 1993 1:48 AM
Well, I've sorta been just fooling around below intuition with printer drivers, and devices and stuff. And I have done some stuff with the windows and the standard gadgets/alert/requester stuff and IDCMP communications. But now I want to build and application with adisplay that has some buttons, areas for text input, and text output, etc. You know, a REAL GUI. My question is, what is the accepted way of getting the display imagery into the program? There must be some way to get it in a data structure that can be linked into the object, no? (Hopfully there is some tool to do this other than building up a a raw image array byte, by byte, by hand.) Thanks for any hints. wmc – via Autopilot!
#37780From: Steve TibbettNov 18, 1993 7:13 AM
I have used a tool called NGI for this – it takes IFF input, and outputs C source in various forms (ie, intuition Image structure) that you can link in with your program easily enough. …Steve
#37792From: Wayne ColeNov 19, 1993 3:00 AM
Steve, That sounds like what I am looking for. I always wondered how to get the image structures that are pointed to from the various Intutition structures into a program. Guess I'll go peruse the libs for NGI… wmc – via Autopilot!
#37794From: Gerald BonnstetterNov 19, 1993 7:19 AM
Hi Wayne I personally do it the easy way. I'm using GadToolsBox to generate a standard look GUI with menus and such. Some other people like the Magic User Interface (MUI). I just started looking at the MUI demo so I cannot say for sure how I would rate it. But if you want roll your own image data. First check out IconEdit that comes with Workbench. At least as far back as WB 2.1, it will let you load IFF images or brushes and save them as C declarations. You need the ToolTypes of SRCDRAWER=your:save_path and SRC set to enable this function. I never made my own gadget image data so I don't know if the Icon image data it generates is the same. Otherwise check the libraries. I don't remember the names now, but I have seen several programs that load images and will save the C code to generate it. Hopefully someone else knows the names of some of these programs. Hope this helps. // \X/ Amiga or bust! Gary Bonnstetter
#37812From: Wayne ColeNov 20, 1993 2:35 AM
Thanks for the info. I have an old copy of GadTools around, which I may need to revisit, but as I recall it uses defualt systme imagery. I want to build an interface that combines motion controll buttons, numerical control data input, feedback data output and logging. But I want to use imagery that makes sense in the context of the devices to be controlled, so I have to build up essentially a computer resident model of the front panel of this device. So I think I need something that takes that imagery and puts it into a raw data space within the program so that when it is called the program can point the Amiga display system to it and say,"show that image on screen A at position xy" at the same time intuition is set to accept appropriate user inputs from that screen. wmc – via Autopilot!
#38357From: Dave ParkDec 18, 1993 4:21 PM
If you would like to load the imagery off the disk rather than build it into the program, check out iff.library.
#38445From: jarrodDec 27, 1993 9:47 AM
Do you know how to use this IFF.Library? I have been working with Amiga E and have the E module for the IFF.library but do not understand how to get the lib to decompress into the bitmap. I get libs to open and work in all other cases> Examples would be appreaciated! Jarrod Roberson Co-SysOp StarsEnd! Atlanta, GA 957-0297
#37825From: Jim PhilippouNov 20, 1993 10:40 AM
Wayne, GadToolsBox is a great utility for creating Amiga GUIs. It generates C, Asm, and Oberon Source for controlling gadgets. I have a question for you. I would like to print a graphic image using the standard Amiga printer driver for the conversion to printer escape sequences. Do you know how to feed a bit map to the print driver? Jim Philippou — 71171,3015 — 71171.3015@CompuServe.com
#37902From: Wayne ColeNov 26, 1993 5:40 AM
>>Do you know how to feed a bit map to the print driver?<< Jim, There's a fairly detailed description in the devices portion of the RKM. Basically the process involves initializing an IODRPReq structure, opening the printer device, then sending PRD_PRTCOMMAND to the printer device. This assumes the printer is graphics capable, and that preferences are set correctly for the printer and the printer driver for the printer supports dumping pixesl to the printer. Included in the IODRPReq structure is a pointer to the rastport and colormap for the image. The RastPort structure carries the bitmap pointer in it. This is the route, as I understand it, for displayed images. If the image is an ILBM, there is a similar process except you use a slightlky different set of structures, I believe. Its been a couple of years since I looked at this in detail, but I think this is the preferred way of doing it. I'm sure (or at least I hope) that someone with more dabling time or actual recent programming experience in this area will jump in and correct me if I'm wrong. wmc – via Autopilot!
#37998From: Jim PhilippouNov 30, 1993 7:23 PM
Wayne, Thanks a million! I have the 2.0 RKM manuals and poured throught the libraries and looked in the includes & autodocs but could not find anything. Your clue sent me right to the correct spot. Jim Philippou — 71171,3015 — 71171.3015@CompuServe.com
#38008From: Wayne ColeDec 1, 1993 4:44 AM
Jim, Glad it worked out for you. wmc – via Autopilot!