Re: Setting Pixels - More answers to suggestions
Hi Robert, Yes, an XCMD is like a DLL only for Macs. It means external command (there are also XFCNs - external functions). I have a script that converts RGB <-> HSV if you are interested. As Monte and others have shown, scripting in different ways can dramatically alter the speed of execution. Perhaps my script might be as fast as your DLL :-) If you would like me to send it, email me off-list. Cheers, Sarah On Thursday, January 30, 2003, at 02:17 pm, Robert J Warren ((Howsoft.com)) wrote: Thanks, and sorry Chipp, I am not only new to Transcript but I also know nothing at all about Macs. I presume that an XCMD is the Mac version of a Windows DLL (?) I am sure that it would help, but I am not sure to what degree. I have only ever written one DLL in my life which is for the said eraser program in VB (due to be launched soon). It converts RGB to HSL and v.v. By doing the calculations in a DLL rather than in the program the saving was about 15%. Although this 15% was crucial in the eraser routine I wrote, it was generally a disappointment: I expected a much bigger saving. ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Setting Pixels - More answers to suggestions
Hi All I never read the original problem but I just made a custom paint tool with this: -- button script on mouseUp InitialiseImageData InitialisePaintColor end mouseUp -- card script local lImageData,lPaintColor,lMouseDown on InitialiseImageData put the imageData of image 1 into lImageData end InitialiseImageData on InitialisePaintColor put binaryEncode("",0,0,255,0) into lPaintColor end InitialisePaintColor on mouseMove x,y if lMouseDown then if word 1 of the target is "image" then set the lockCursor to true set the cursor to cross put (x-the left of image 1)*4+(y- the top of image 1)*(the width of image 1*4) into x put lPaintColor into char x-3 to x of lImageData set the imageData of image 1 to lImageData end if else pass mouseMove end if end mouseMove on mouseDown put true into lMouseDown end mouseDown on mouseUp put false into lMouseDown end mouseUp on mouseRelease put false into lMouseDown end mouseRelease Hope you like drawing squigly lines ;-) Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Setting Pixels - More answers to suggestions
> > I think you can speed this up just a litle bit on the > first run by changing: > if tData = "" then > put char 1601 to -1 of the imageData of image 1 \ >into tData > end if > This ought to be slightly faster as the engine doesn't > have to resize the tData variable again, nor push its > contents forwards upon deleting from the front. > Yep Back down to 0.162 I think what I'd do would be to initialise the data when the image was first opened. Say openStack? Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution