1. Message from Internet
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Nov 17, 1998
- 650 views
Pete Eberlein writes: >>You bet We're aimed at the SVGA crowd, despite the fact that Neil does indeed choke on some video boards. But when it does work, the 16M colors= are nice, and the speed is to behold.<< As far as I have seen and tried the different 'high color' libraries, Nei= l is the only one till now that runs good on my hardware. I have a P75 with= 40Mb and a 'Trident' graphical card. Thanks, Ad
2. Message from Internet
- Posted by Hans van Meel <106752.2624 at COMPUSERVE.COM> Nov 10, 1997
- 613 views
Hi Jean, >>I try now Get Euphoria log1097 but it don't work. Whay can I do ?<< You can send a message to: listserv at miamiu.acs.muohio.edu and put only this in the body of the message: get euphoria log9710 Good luck! Regards Hans van Meel
3. Message from Internet
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Mar 09, 1998
- 605 views
Andrew Mitchell wrote: >How do I clip an image that has been loaded by read_bitmap()? I >am trying to fit a large picture into a 533x370 area. I have the >following section to clip the width that doesn't work. It does >run all of the lines, and length(tmp_img) is 800 > if length(tmp_img) > 533 then = >tmp_img1=3Dtmp_img[1..533] tmp_img=3Dtmp_img1 end if = > display_image({11,49},tmp_img1) >I thought that it would look like this: >000001111 000001111 000001111 000001111 111111111 111111111 >with 0's being the part I want to display = Andrew, The function read_bitmap returns a 2-element sequence, that is, if the bitmap is successfully loaded. The first element is the palette of colors= used in the bitmap, and the second element is again a 2-dimensional sequence containing the actual pixel information of the picture. The leng= th of this sequence is equal to the number of 'lines' (pixels down) the picture has. The length of each line is the width in pixels. So if you want to clip a part of your picture, first you should clip horizontally: -- read in a big bitmap of, say, 768 x 1024 bitmap =3D read_bitmap(c:\\windows\\big_bmp.bmp) --... if success: palette =3D bitmap[1] image =3D bitmap[2] -- reduce the height of the image: -- no need to define a new sequence, unless you want to use image again image =3D image[TopLine..BottomLine] -- reduce the width of the image: for n =3D 1 to length(image) do image[n] =3D image[n][LeftColumn..RightColumn] end for -- This ends the Procrustrian treatment of the image! See also the program \demo\dos32\bitmap.ex. -- clip part of bitmap image -- bitmap displayer -- usage: ex bitmap file[.bmp] -- -- example: ex bitmap c:\windows\forest -- -- It tries to use mode 261 for 256-color bitmaps and -- mode 18 for 16-color or less. If you can't get into mode 261 -- try mode 19, or see graphics.e without type_check include image.e constant ERR =3D 2 sequence cl object bitmap sequence image, Palette cl =3D command_line() if length(cl) < 3 then puts(ERR, "usage: ex bitmap file.bmp\n") abort(1) end if if not find('.', cl[3]) then cl[3] =3D cl[3] & ".bmp" end if bitmap =3D read_bitmap(cl[3]) if atom(bitmap) then -- failure if bitmap =3D BMP_OPEN_FAILED then puts(ERR, cl[3] & ": " & "couldn't open\n") elsif bitmap =3D BMP_UNEXPECTED_EOF then puts(ERR, cl[3] & ": " & "unexpected end of file\n") else puts(ERR, cl[3] & ": " & "unsupported format\n") end if abort(1) end if Palette =3D bitmap[1] image =3D bitmap[2] -- clip the upper half of a big bitmap -- also the number of display lines is reduced image =3D image[1..350] for n =3D 1 to length(image) do -- each line is clipped to display only the left half of it image[n] =3D image[n][1..500] end for integer mode, xstart if length(Palette) > 16 then mode =3D 261 -- do you have this mode? else mode =3D 18 -- almost everyone has this one end if if graphics_mode(mode) then puts(ERR, "bad graphics mode\n") abort(1) end if all_palette(Palette/4) -- set the whole palette display_image({0,0}, image) -- always display first one while get_key() =3D -1 do end while if graphics_mode(-1) then end if -- end snip Hope this helps, Ad Rienks