C (14/414)

From:Hynek Schlawack
Date:01 Jun 2000 at 18:26:01
Subject:Re: Graphics

On 01-Jun-00 wrote Allan Odgaard:

>>> Well, BitMapScale() (from graphics.library) can scale plain Amiga
>>> bitmaps or even chunky bitmaps, if the user uses P96 or CGX.
>> I suppose it will eat a lot of Chip RAM, right?
> No -- only sizeof(src_bitmap) + sizeof(dst_bitmap), where dst_bitmap
> could be the screen bitmap, which wouldn't add to the equation.

That's enough :-).

>>> special functions of the cybergraphics.library, or just use
>>> BltBitMapRastPort(), assuming the bitmap is allocated and treated
>>> correctly...
>> What do you mean with allocated and treated correctly? Can
> E.g. use the picture.datatype in V43 mode, get the image as a
> bitmap, scale it and blit it to the screen. This should allow you to
> decode, scale and blit images in true colour.

But I didn't want to use datatypes except of the datatypes module...it
should be a replacement for Visage if I'll finish it one day.

>> BltBitMapRastPort() also use chunky data? I definitly don't want to
>> use the cybergraphics.library as I have AGA and no PPC.
> Well, you'd do something like:
> if(my_pic->Depth >= 15 && GetBitMapAttr(scr_bmp, BMA_DEPTH) >=
> 15)
> {
> cybergraphics.library/WritePixelArray(...);
> }
> else
> {
> Remap(my_pic);
> graphics.library/WritePixelArray8(...);
> }
> So your program would only require the library if it was runned on a
> high colour system (where it's most likely present).

That is not exactly what I want because the BitMap can contain
anything before being blittet and so I need an other possibility to
detect cybergraphics...maybe just by trying to open it :-).

>> And for truecolor pictures? I suppose that 255 pens ain't enough
>> :-):
> True colour images have no palette. Each pixel is represented as an
> RGB-tupel.

Ah! Is that a array of structs in that case, right?

>> That's my problem...how to scale ILBM pictures...and the datatypes
>> library returns planar data too...
> Not V43+!

My program should work under OS 3.0 (I personally have OS3.5...) w/o
something speciaö in addition...I want that thrill :-).

>> but I heard I can use ReadPixelLine8() for the planar->chunky
>> conversion?
> Yes, you can write the image data to a bitmap, encapsulatee it in a
> rastport and use ReadPixelArray8() to read it into a chunky buffer.

Yeah, I have made it at last on my own some hours ago. Now I can begin
to write my scaling algorithm.

> But if you're writing your own decoder then it may be faster (and at
> least more memory friendly) to decode the image data directly into
> the chunky buffer. Though most p2c stuff is best done in assembler,

Decode ILBM directly into chunky? How that?

> since asm offers a lot of nice bit shifting instructions like 'roxl'
> iirc :-)

My p2c is a simple OS function, I don't care about how it works :-).

P.S.: I got a very fast answer from Timm Müller and he promised me
that guigfx and render are _not_ dead and that the homepage will be
online in some weeks again. He considers the libraries as finished
and wants only continue if bugs or good suggestions are submitted.

Regards,



Hynek Schlawack · mailto:hynek.s@web.de · http://me.in-berlin.de/~hys

------------------------------------------------------------------------
fnCentral.com: it's where you are! Be deskbound no more. No apps.
Use the web's first fully integrated personal finance manager
from any PC, Palm, phone, internet appliance! OPEN A FREE ACCOUNT NOW.
http://click.egroups.com/1/4647/1/_/451227/_/959881483/
------------------------------------------------------------------------