1. Features and a Question
- Posted by Nate Brooman <nateb at LOG.ON.CA> Sep 08, 1998
- 385 views
First, the question. Can I display high or true colour JPGs in Euphoria? Has anybody written any routines for this? I don't know where to start anyways . This is what I want to do. I want to write a simple fake 3D (and I do mean fake using true colour JPGs of my bedroom (if I can fit in it , and then use the details from my bedroom JPGs to make up the fake 3D program, then a real 3D program in Euphoria. Can anyone provide me with any routines for me to do this? I don't use the infamous GIF format because: A. You have to pay royalties with ANY program that uses GIFs B. GIF only has 256 colours and no layering. To do what I want to do, it just isn't fesable to use GIFs. Now to the Features post by Jiri: What I hate most about Euphoria is the variable declaring. BASIC, even C is relatively easy to declare variables. I used to use BASIC, Pascal, or C to do my programs for my maths class. I use Euphoria now, though. Rob showed me how. - Nate P.S. Uh... Jiri, he's gonna get your messages anyways! He's gone, but is his e-mail? ---------- > From: jiri babor <jbabor at PARADISE.NET.NZ> > To: EUPHORIA at LISTSERV.MUOHIO.EDU > Subject: Re: Features > Date: September 8, 1998 10:06 AM > > Hi guys, > > Let's have a riot! Or at least a rowdy heretic party while the boss is > away: what do you hate most in Euphoria? > > When he gets back from his cruise, well rested, he might even find it > mildly amusing, if not exactly useful... > > I mean existing obnoxious features, not the missing things that you > want to add. > > My list is long, but I am also well known as a moaner. My complaints > range from really petty ones to real monsters. Here we go: > > > case sensitivity: I prefer to use the case for my own purposes. I know > this is not going to be terribly popular, and I suppose it also > saves a millisecond or two while parsing... > > unnecessarily long words and redundant brackets: sometimes I feel > 'procedure' must be the longest word in the English dictionary... > Why to use integer, constant, sequence, procedure when everybody > else is using int, const, list and proc or def? And, please, do > not tell me I need a typing course or a better editor! > > constants: WHY?!!! Capitalize the name of the variable, if you cannot > resist the urge, but why the extra noise? > > comma separator: I do not know why I find it so irritating, so > hideous, so BASIC like. White space would do the same job. > > curly brackets: my pet hate. Probably the most frequent element in > Euphoria code. And it requires a shift key! And I still can't do > it by hand. The curly and square brackets must be switched at > midnight on New Year's Eve! And do not wait for the year 2000! > > types, type checking: this is a biggy, almost certainly the most > useless feature of Euphoria - all reasons proffered for its > existence are at best metaphysical. > > variable declaration: even BASICs have automatic variable declaration. > If you accept my previous point about a total uselessness of types, > and I expect the more orthodox types among you (sorry about the > pun), especially some youngsters, might have a real problem with > it, then it follows we should have just one type: objects. And > they would be automatically declared at, and their names recognized > as valid from the point of the first assignment. Note, we would > still need the sequence(), atom() and integer() functions! > > This is roughly all I can think of right now with a throbbing headache > - the second bout of flu this winter, and I even had a flu shot at the > beginning of the season. > > I hope you also noticed I have not even mentioned exw - perhaps > because I can't care less about it. > > Please, no foul smelling articles in the mail. jiri
2. Re: Features and a Question
- Posted by Hawke <mdeland at NWINFO.NET> Sep 08, 1998
- 382 views
Nate Brooman wrote: >First, the question. Can I display high or true colour >JPGs in Euphoria? Has anybody written any routines for >this? I don't know where to start anyways . as far as I know, JPG's aren't implemented yet, in any of the available libraries. However! you can get true color if you are willing to use Targa. If (for ex.) you use paintshoppro, simply make your resulting images in the 24bit, uncompressed targa format. you can use the batch processing feature of PSP (which is why i suggested it--i assume you already have these jpg's) to convert an entire directory of images in a fell swoop. then you will need the truecolr.e library from chris street, available on the main euphoria page. that library does have a bug or two... the bug that will keep you from doing things however, is rather nasty. below you will find the fixed function in that library that causes a heinous error... just cut/paste back to the library and itll work properly. the library is quite lacking in 'the basics', and i'm one bug away from uploading a new truecolor library, with many, many new features, and truecolor mouse support as well (what's stopping me is the damned mouse cursor keeps wrapping around the right edge of the screen...ARGH!) last note: for some reason you need to 'flip' the targa images along the horizontal axis (top->bottom) before saving them...it'll display the image upside down if you don't...doesn't seem to be a problem with the library code tho...not sure. here is the fixed function: global procedure copy_image (atom a1,atom a2,sequence w1,sequence w2) atom b1,b2 integer nx,ny,wid1,wid2 wid1=get_width(a1) wid2=get_width(a2) b1=a1+8+((w1[1][2]*wid1)+w1[1][1])*bpp b2=a2+8+((w2[2]*wid2)+w2[1])*bpp --this is the bad line --it used to be: --nx=w1[2][1]-w1[1][2]+1 nx=w1[2][1]-w1[1][1]+1 ny=w1[2][2]-w1[1][2]+1 if nx+w2[1]>=wid2 then nx=wid2-w2[1] end if if ny+w2[2]>=get_height(a2) then ny=get_height(a2)-w2[2] end if for e=1 to ny do mem_copy(b2,b1,nx*bpp) b1=b1+(wid1*bpp) b2=b2+(wid2*bpp) end for end procedure