1. converting bitmaps to use standard palette and still look good
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Oct 09, 1998
- 533 views
Hello, I just wrote this function that is supposed to convert a bitmap so that it can work with the standard euphoria palette but I'm having problems. Apparently the pic I tried to convert has a palette that has NOTHING in comon with the standard palette. Does anyone know how to get this function to work or has anyone already written something that does this or know of one? Lewis Townsend global function new_pal (sequence pal_n_pic) -- this function makes a bitmap work with the standard palette -- call this function BEFORE you call all_palette object pal, pic, realpal realpal = get_all_palette () pal = pal_n_pic [1]/4 pic = pal_n_pic [2] position (1,1) puts (1, "Converting bitmap to normal palette:\n[" & repeat (' ', length(pic [1])/5) & "]") position (2,2) for x = 1 to length (pic) do if integer (x/5) then puts (1, "#") end if for y = 1 to length (pic [x]) do --if find(pal [pic [x] [y] +1], realpal) then -- UNREMARK THIS 'IF' STATEMENT AND 'END IF' TO -- SKIP ANY PIXELS IT CAN'T MATCH pic [x] [y] = find (pal [pic [x] [y] +1], realpal)-- -1 -- UNREMARK THE '-1' AT THE END FOR REAL ATTEMPT ======^^^ --end if end for end for puts (1, "\n Complete, thank you for waiting") return {realpal,pic} end function ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
2. Re: converting bitmaps to use standard palette and still look good
- Posted by Matt Z Nunyabidness <matt1278 at JUNO.COM> Oct 09, 1998
- 525 views
why don't you just use all_palette before you display the bitmap? _________________ When it comes to programming languages, Euphoria is a cut above matt1278 at juno.com Euphoria programmer Webbers: <A HREF="mailto:prezsoft at juno.com">prezsoft at juno.com</A>, president of SoftCo. All virus proggers should die horrible deaths™ ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com or call Juno at (800) 654-JUNO [654-5866]
3. Re: converting bitmaps to use standard palette and still look good
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Oct 13, 1998
- 527 views
Hello, Thanks David, for the palette function I'll try it out right away. Sincerely, Lewis Townsend PS. Matt was wondering why I don't just use all_palette (). well, 2 reasons 1. I want to be able to use bitmaps with different palettes in the same program without messing up the colors every time 2. I want to be able to use 256 color bitmaps in mode 18 ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
4. Re: converting bitmaps to use standard palette and still look good
- Posted by Matt Z Nunyabidness <matt1278 at JUNO.COM> Oct 13, 1998
- 544 views
>PS. Matt was wondering why I don't just use all_palette (). > well, 2 reasons > 1. I want to be able to use bitmaps with different palettes >in the same program without messing up the colors every time > 2. I want to be able to use 256 color bitmaps in mode 18 oh, ok. i catch your drift now. _________________ "When it comes to programming languages, Eu is a cut above" - Matt1278 and Prezsoft Webbers: <A HREF="mailto:prezsoft at juno.com">prezsoft at juno.com</A>, president of SoftCo. All virus proggers should die horrible deaths™ ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com or call Juno at (800) 654-JUNO [654-5866]