1. Light and slow crappy image scaling

I just wrote a routine to scale a titlebar (640*22) in the x dimension, ie.
to make it stretch to the left and right, but not in the height. The routine
can only scale one line at a time. I think it's slow, but I could be
wrong...
Here it is, you laugh and you die! (j/k)


object newline,ix

global function shrink_line(sequence line,integer l)
newline = repeat(0,l)
ix = 1
for i = 1 to length(line) by length(line)/l do
    newline[ix] = line[i]
    ix = ix + 1
end for
return newline
end function

Mike The Spike
PS. 'line' is a sequence of color index values into the palette (ie.
read_bitmap()[2][1]), and 'l' is the new length to give the line (ie. scale
it)
And, this comes from a Euphoria program, Interpretted that is.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » topic index » view message » categorize

2. Re: Light and slow crappy image scaling

>I just wrote a routine to scale a titlebar (640*22) in the x dimension, ie.
>to make it stretch to the left and right, but not in the height. The
>routine
>can only scale one line at a time. I think it's slow, but I could be
>wrong...
>Here it is, you laugh and you die! (j/k)
>
>
>object newline,ix
>
>global function shrink_line(sequence line,integer l)
>newline = repeat(0,l)
>ix = 1
>for i = 1 to length(line) by length(line)/l do
>    newline[ix] = line[i]
>    ix = ix + 1
>end for
>return newline
>end function
>
>Mike The Spike
>PS. 'line' is a sequence of color index values into the palette (ie.
>read_bitmap()[2][1]), and 'l' is the new length to give the line (ie. scale
>it)
>And, this comes from a Euphoria program, Interpretted that is.

Huh?
I just used the line routine above to create a "scale_bitmap" routine, then
I did a loop with Jiri's "scale_image" routine and my routine stretching the
same bitmap every iteration yet drawing them below eachother, and they both
draw it at the same pixel-precise speed!
Eighter it's a timing thing in ex.exe, or both routines are 100% equaly
fast!

Can I just attach the program to my mail?
Or won't that work?

Mike The Spike

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Light and slow crappy image scaling

----- Oorspronkelijk bericht -----
Van: Mike The Spike <mikethespike2000 at HOTMAIL.COM>
Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Verzonden: zondag 16 april 2000 3:43
Onderwerp: Re: Light and slow crappy image scaling


< snip >
> Can I just attach the program to my mail?
> Or won't that work?
>
> Mike The Spike

You can, i.e. if it's not an EXE. But isn't it time to go to sleep now?

Bye, Ad

new topic     » goto parent     » topic index » view message » categorize

4. Re: Light and slow crappy image scaling

>< snip >
> > Can I just attach the program to my mail?
> > Or won't that work?
> >
> > Mike The Spike
>
>You can, i.e. if it's not an EXE.
It was an exe, but forget about it, it's not *that* spectacular :p
>But isn't it time to go to sleep now?

Yeah I know...
It's 6 in the morning...
Never mind though, I'll sleep tomorrow! :p

>Bye, Ad

L3343r!


Mike The Spike
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu