Re: Script help needed

2003-12-30 Thread Jan Schenkel
--- David Squance <[EMAIL PROTECTED]> wrote:
> Greetings,
> The following is part of a button script which gives
> an error message
> "chunk: no such object"
> 
>  put the drawnumber of this card into temp2   --
> there is the correct value
> in the custom properties
>   toplevel stack "draw lists"   -- goes to another
> substack
>   find temp1  -- this is from further up the
> handler, finds the correct
> card and is not a problem
>   put empty into fld temp2  -- there *is* a fld with
> the name drawn from
> the custom property
> 
> If I use the message box with:
> 
>  put the drawnumber of this card into temp2
>   toplevel stack "draw lists"
>   find temp1
>   put temp2
> 
> I get the expected result--the name of fld to be
> emptied.
> I tried:
> 
> put quote&temp2"e into temp2
> 
> since it is a field name, but that made no
> difference.
> 
> Any help would be appreciated.  TIA
> 

Hi David,

Is there actually a field  on the card where
the result is found ? Once you toplevel the other
stack, you'll be in that other stack, and simple
control references are considered relative to tha
stock, not the new stack.
So a possible solution is the use o the long ID :
--
  put the drawnumber of this card into temp2
  put the long ID of fld temp2 into tFieldLongID
  toplevel stack "draw lists"
  find temp1
  put empty into fld tFieldLongID
--

Hope this helped,

Jan Schenkel.

=
"As we grow older, we grow both wiser and more foolish at the same time."  (La 
Rochefoucauld)

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Converting a PicHandle to format for use with imageData

2003-12-30 Thread Paolo Mazza
I am sorry. I do not know this PicHandle
Best regards,
paolo mazza

Lunedì, 29 Dic 2003, alle 17:38 Europe/Rome, Trevor DeVore ha scritto:

I've had a request to add support to my QT External for extracting an 
image from a QuickTime movie (poster movie or the frame at a certain 
point in time) and assigning it to an image in Revolution.  Getting an 
image from a QT movie is pretty straightforward but the QT API returns 
a PicHandle.  I have absolutely no idea how to get this into a format 
that Revolution could use for imageData and was wondering if anyone on 
the list had any experience with this.

Thanks,

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] Window External

2003-12-30 Thread Paolo Mazza
Wuold you be able to write an external to copy and paste a selection of 
an image with a transparent background in Revolution?
This wuold be great... at the moment if you select with the selection 
tool part of one image with a transparent background and you copy it 
into an other image you will get a white square.
I ask to the rev people to add this feature to the next release.. I do 
not know if they will do it.
Best Regards,  Paolo Mazza

Lunedì, 29 Dic 2003, alle 20:21 Europe/Rome, Trevor DeVore ha scritto:

I have posted another external which is free for anyone to use and 
abuse.  The external is available for Mac OS X and Windows though I 
believe the transparency stuff only works on Windows 2000 >.  There 
are 3 functions so far -

SetWindowAlpha - Set the opacity of a stack window
GetWindowAlpha - Get the current opacity of a stack window
SetWindowTransparentColor (Windows only) - Set a transparent color for 
a stack window.  For example, you could make all white portions of a 
stack transparent.

The external is available at my website:

I have tested on Mac OS X.3.2 and Windows 2000.  I would be interested 
in hearing about any experiences on other platforms.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Excel

2003-12-30 Thread Martin Baxter
>Ken Norris wrote :
>Howdy,
>
>Is there any way to get Rev *on a Mac* to open an MS Excel document, created
>in Windows, and extract data?
>

Another piece of software that could help here is MacLinkPlus, which could
translate the excel files into tab/return delimited text or whatever, and
is applescriptable.


Martin


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: GET Request from Revolution Fails

2003-12-30 Thread jbv
Hi there,

>
> So, our eCommerce xTalk back end complete with CC# verification,
> authorization and run time charge and deposit with all associated HTML
> for online subscriptions to Hinduism Today magazine ... is almost
> complete. If anyone thinks it useful I'll post the code on the
> contributions... so, we really don't need PERL after all  --Thank
> goodness, because we are not "real" programmers here anyway...

I'm highly interested in your code, as I might do something
quite similar for a client soon.
I missed a part of this thread though, hence my question :
is your xTalk script running as a client app or as a CGI script
on a server responding to requests sent from a browser ?

In the project I might work on next month, various tasks will need
to be done, including on-the-fly generation of PDF docs; that's why
I'd prefer to use MC as CGI rather than Perl of PHP (as such onthefly
generation of docs is easier - by several orders of magnitude - to do
with xTalk).
End users will also have the possibility to deposit some money (via their
CC#) on a personal account, for which I'd like to provide some online
management tools (mostly : history). Obviously, such online tools
require secure connections via SSL / https, and I guess there's no
hope to manage such process from MC/Rev as CGI...

Best,
JB

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] Window External

2003-12-30 Thread Geoff Canyon
Great stuff, Trevor! Of course, I immediately tried it with a 
windowshaped window, and it worked just fine -- a great effect, too!

regards,

Geoff Canyon
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Script help needed

2003-12-30 Thread David Squance
>How about:

>  do "put empty into fld" && quote & temp2 & quote

>??

>HTH,

Thanks, Ken, but it didn't.

Jan,
>Is there actually a field  on the card where
>the result is found ?

Yes, that card has a field with the name that is the
value of the variable, temp2

>So a possible solution is the use o the long ID :
>--
>  put the drawnumber of this card into temp2
>  put the long ID of fld temp2 into tFieldLongID
>  toplevel stack "draw lists"
>  find temp1
>  put empty into fld tFieldLongID

Thanks, but I don't think so.  There's no field 
in the card of the stack which contains the custom
property providing input to the variable, temp2.  But the
problem, it seem to me, is using the value drawn from a
customproperty, putting it into a variable and then trying
to access a field of that name.  Since the button is part of
a background, and the value of the custom property will
vary, I don't see how working IDs into the mix will be viable.
Dave


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: FOLDER via FTP

2003-12-30 Thread Paolo Mazza
Here it is the script to transfer a folder via FTP. It works.  any 
suggestion to increase security?
I wish you an happy new year.
Ciao Paolo

LOCAL tUrl,tUrl2,LISTAFILES,KK,NOMECARTELLAREMOTO

on MouseUP
  if the opensockets is not empty then resetAll
  put field "MioFile" of this card into NOMECARTELLA
  if there is not folder NOMECARTELLA then exit to top
  set itemdelimiter to "/"
  put the last item of NOMECARTELLA into NOMECORTO
  set itemdelimiter to comma
  put "Desideri trasferite tutta la cartella" && NOMECORTO into DOMANDA
  answer  DOMANDA with "OK" or "ANNULLA"
  if it is "OK" then
put field "MyUsername" of first card  into NOME
put field "MyPas" of first card  into PAS
put field "MyHost"  of first card into NOMEHOST
put "ftp://"; &  NOME & ":" & PAS   & "@"  & NOMEHOST & "/" into tUrl
put empty into LISTAFILES
set the defaultfolder to NOMECARTELLA
put the files  into LISTAFILESTEM
repeat for each line LINEA in LISTAFILESTEM
  if char 1 of LINEA is "." then next repeat
  put LINEA & return after LISTAFILES
end repeat
ask "Nome della nuova cartella" with NOMECORTO
put it into NOMECARTNUOVO
CARICACARTELLA NOMECARTNUOVO
  end if
end MouseUP
On CARICACARTELLA NOMECORTO
  libURLSetFTPStopTime 30
  set itemdelimiter to "/"
  put field "cardes"  & "/" & NOMECORTO into NOMECARTELLAREMOTO
  put NOMECARTELLAREMOTO & "/.fantasma.txt" into NOMEFILEREMOTO
  put tUrl  &  NOMEFILEREMOTO  into  tUrl2
  put empty into tData
  libURLftpUpload tData,tUrl2,FINITO
end CARICACARTELLA
on FINITO then
   put tUrl2 & return into message
  -- delete URL tUrl2
  put 1 into KK
  put line KK of LISTAFILES into LINEA
  if there is file LINEA then
CARICADATI LINEA
  else
exit to top
  end if
end FINITO
On CARICADATI NOMEFILE
  set itemdelimiter to "/"
  put last item of NOMEFILE into NOMECORTO
  if the hilited of button "dati" is true then
put "binfile:" & NOMEFILE into NOMEURL
  else
put "file:" & NOMEFILE into NOMEURL
  end if
  put tUrl & NOMECARTELLAREMOTO & "/" & NOMECORTO into tUrl3
  put url NOMEURL into tData
  put tUrl3 & return after message
  libURLftpUpload tData,tUrl3,FINITO2
  -- FINITO2
end CARICADATI

on FINITO2 then
  -- if the opensockets is not empty then resetAll
  put empty into LINEA
  if KK >= (the number of lines of LISTAFILES) then
answer "Caricamento effettuato" with "OK"
exit to top
  end if
  put KK + 1 into KK
  put line KK of LISTAFILES into LINEA
  if LINEA is not empty and there is file LINEA then
CARICADATI LINEA
  else
answer "Errore nella trasmissione del file" with "OK"
exit to top
  end if
end FINITO2


Lunedì, 29 Dic 2003, alle 12:06 Europe/Rome, Paolo Mazza ha scritto:

How can I send a folder via FTP to a FTP server?

I know how can I send a file via FTP, but I found no hints on the doc 
about sending  ( or creating)  a folder.

Best regards,

Paolo Mazza

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Converting a PicHandle to format for use with imageData

2003-12-30 Thread Trevor DeVore
On Dec 29, 2003, at 3:29 PM, Thierry Arbellot wrote:
So, the code should look like this:
Okay, I've implemented your code example and am able to get a picture 
into an image object in Revolution.  The pictures I grab from stills or 
movies don't look right however.  You can see what the image should 
look like here 
 
and what the image I am getting in Revolution looks like here 
.

I have tried various methods of putting an image into the GWorld (going 
to a certain time in the movie and putting that into the GWorld as well 
as using the QT API call GetMoviePict/GetMoviePosterPic) with the same 
result.

Any ideas on what might be happening?

Here is the code:

// Get movie dimensions and create offscreen GWorld
GetMovieBox(mv, &movieFrame);
NewGWorld(&theGWorld, k32ARGBPixelFormat, &movieFrame, NULL, NULL, 
(GWorldFlags)0);

SetGWorld(theGWorld, NULL);

// get image from movie and put into GWorld
thePicHandle = GetMoviePosterPict (mv);
EraseRect(&movieFrame);
DrawPicture(thePicHandle, &movieFrame);
LockPixels(GetPortPixMap(theGWorld));
thePixMap = *(GetPortPixMap(theGWorld));
if (thePixMap->baseAddr != NULL) {
rdata.sptr = thePixMap->baseAddr;
rdata.length = movieFrame.right * movieFrame.bottom * 4;

SetVariableEx(args[0], "", &rdata, &retvalue);

retstr = (char *)malloc(8);
sprintf(retstr, "%s", "Success");
} else {
retstr = (char *)malloc(8);
sprintf(retstr, "%s", "Failure");
}
UnlockPixels(GetPortPixMap(theGWorld));
DisposeGWorld(theGWorld);
DisposeHandle((Handle)thePicHandle);
CloseMovieFile(refnum);
DisposeMovie(mv);
--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] Window External

2003-12-30 Thread Trevor DeVore
On Dec 30, 2003, at 2:17 AM, Paolo Mazza wrote:

Wuold you be able to write an external to copy and paste a selection 
of an image with a transparent background in Revolution?
This wuold be great... at the moment if you select with the selection 
tool part of one image with a transparent background and you copy it 
into an other image you will get a white square.
I ask to the rev people to add this feature to the next release.. I do 
not know if they will do it.
I think this is something that this is better to implement in the 
development environment rather than an external.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] Window External

2003-12-30 Thread Trevor DeVore
On Dec 29, 2003, at 11:45 PM, Ops wrote:

Thank you very much Trevor!!  Unfortunately, my client is archaic and
expects me to get this to work on his Win98 machine which drives his
businessI haven't (obviously) been successful in getting him to 
upgrade,
as his app+machine are "not broke" (his words)!?!?!  
..hh
I believe there is a way to do this in Windows 98 as well.  I saw some 
reference to it in the MSDN Library as I was browsing through it last 
night.  I will see if I can figure out how to implement this in the  
external as well.  Of course, if anyone else wants to take a shot at it 
before I get around to it the source code is available from my website.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] Window External

2003-12-30 Thread Trevor DeVore
On Dec 30, 2003, at 9:21 AM, Geoff Canyon wrote:

Great stuff, Trevor! Of course, I immediately tried it with a 
windowshaped window, and it worked just fine -- a great effect, too!
Thanks Geoff.  One interesting use of this would be for drag and drop.  
You could display a windowshaped window that is partially transparent 
when the user clicks on something that can be dragged.  This would be 
similar to what the finder and Windows Explorer do.

One request I received was to be able to apply a grayscale (8 bit) 
image to a stack window for transparency (Rev supports 1 bit).  This 
would make the effect I describe above even cleaner looking.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Excel

2003-12-30 Thread Jim Carwardine
I'm looking at using the iFolder on a Novell server to synch an Excel file
between it and my Mac.  This same file is put there by a PC user who reading
and writing.  I'm only reading.  Haven't tried it yet but am hopeful.  After
the synch action, you could use AS to get the data on your Mac I hope...
Jim

on 12/29/03 6:30 PM, Jan Schenkel wrote:

> --- Ken Norris <[EMAIL PROTECTED]> wrote:
>> Howdy,
>> 
>> Is there any way to get Rev *on a Mac* to open an MS
>> Excel document, created
>> in Windows, and extract data?
>> 
>> We live in hope...
>> 
>> TIA,
>> Ken N.
>> 
> 
> Hi Ken,
> 
> As the MS Excel file format is proprietary, I'd try
> launching the file with your MacOS Excel app, and then
> extract the data using AppleScripts -- Excel 5 used to
> be applescriptabe, so I'm hoping Excel v.X still is.
> If you don't have Excel on your Mac, you'll have to
> find a place with the file format, or disect the
> source code of OpenOffice to find outhow they read
> Excel files into their spreadsheet app.
> 
> Hope this helped a little,
> 
> Jan Schenkel.
> 
> =
> "As we grow older, we grow both wiser and more foolish at the same time."  (La
> Rochefoucauld)
> 
> __
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> ___
> use-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution

-- 

OYF is... Highly resourceful people working together.


Own Your Future Consulting Services Limited,
1959 Upper Water Street, Suite 407, Halifax, Nova Scotia. B3J 3N2
Info Line: 902-823-2477, Phone: 902-823-2339. Fax: 902-823-2139



___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creating windowShapes in Rev

2003-12-30 Thread Ken Norris
Hi Dar,

> Date: Mon, 29 Dec 2003 20:56:56 -0700
> From: Dar Scott <[EMAIL PROTECTED]>
> Subject: Re: Creating windowShapes in Rev
> 
> 
> On Monday, December 29, 2003, at 08:12 PM, Ken Norris wrote:
> 
>> Now, how do I create complex shapes to match outlines of other images
>> I want
>> to overlay?
> 
> This might help:
> http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm

I assume you mean the 'Compositing Example' stack, yes? It's very cool, and
I will need to study what happens.

What's really needed is a full-blown image processor plugin, eh?

> I have something, but it is ugly and really needs nested arrays.

Nested arrays? Do you mean you are creating some paint tools to accomplish
these tasks? Perhaps by examining what's under the tool point, changing the
arrays and redrawing when you save?

> You might also consider taking a picture with export snapshot to a
> variable and then looking for white or some other color to make
> transparent parts in the final picture.

If I 'export snapshot' into an 'image' will it automatically convert to an
image format, i.e., Rev's own 1-byte proprietary format?

If so, then I think I see a little of what you mean. If we use a proprietary
method, we *should* be able to do this:

1) If we can 'export snapshot' into an image, it should produce an 8-bit
image rectangle with white pixels outside the paint area to the edges of the
rectangle.

2) Use the maskData property to set all the white pixels to transparent.

3) In order to facilitate a mask I can understand when I see it, I will want
to change all non-transparent pixels to black (or some other 8-bit color to
distinguish it from overlaid images for alignment purposes) during the
process.

You still have to go through every pixel and re-render, right?

All this could be solved with a zoom control, a lasso tool, and some pixel
controls in Rev's Paint Palette, so that's on my wish list.
 
> Think the weatherman before a bluescreen.

Hmmm...must be a Windows thing. Being a Mac person, I've never seen a
'bluescreen'. Mac Sad Face, yes, Chimes of Death, yes, but no BlueScreen ;-)

> I made the same ID mistake, BTW.

I'd be willing to bet that everyone does the first time they use it.

I understand that in this case there is nothing but an image ID to set the
stack to, but IMO it's still an unexpected deviation from the usual syntax.
I mean, looking at a script, you could easily mistake setting the stack to
another stack ID or something, without the designation of "image" or
"stack". 

Thanks much,
Ken N.


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


USB mics supported by Record?

2003-12-30 Thread Richard Gaskin
I have a USP mic that works great for recording in other apps, but when
using Rev's record sound command it only captures the very last bit of what
I'm recording.

I'm using "Default" as the recordInput, as there is no option specifically
for a USB mic and all other options generate an error when I attempt to
record.

Any of you have success with USB mics and the record sound command?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Converting a PicHandle to format for use with imageData

2003-12-30 Thread Thierry Arbellot
Looks like the image in Rev doesn't have the same width and height as 
the grabbed picture.
If it's the case, adjust the width and height before putting the 
picture into the imageData

Hope it helps.

Thierry.

On Tuesday, Dec 30, 2003, at 19:51 Europe/Paris, Trevor DeVore wrote:

On Dec 29, 2003, at 3:29 PM, Thierry Arbellot wrote:
So, the code should look like this:
Okay, I've implemented your code example and am able to get a picture 
into an image object in Revolution.  The pictures I grab from stills 
or movies don't look right however.  You can see what the image should 
look like here 
 
and what the image I am getting in Revolution looks like here 
.

I have tried various methods of putting an image into the GWorld 
(going to a certain time in the movie and putting that into the GWorld 
as well as using the QT API call GetMoviePict/GetMoviePosterPic) with 
the same result.

Any ideas on what might be happening?

Here is the code:

// Get movie dimensions and create offscreen GWorld
GetMovieBox(mv, &movieFrame);
NewGWorld(&theGWorld, k32ARGBPixelFormat, &movieFrame, NULL, NULL, 
(GWorldFlags)0);

SetGWorld(theGWorld, NULL);

// get image from movie and put into GWorld
thePicHandle = GetMoviePosterPict (mv);
EraseRect(&movieFrame);
DrawPicture(thePicHandle, &movieFrame);
LockPixels(GetPortPixMap(theGWorld));
thePixMap = *(GetPortPixMap(theGWorld));
if (thePixMap->baseAddr != NULL) {
rdata.sptr = thePixMap->baseAddr;
rdata.length = movieFrame.right * movieFrame.bottom * 4;

SetVariableEx(args[0], "", &rdata, &retvalue);

retstr = (char *)malloc(8);
sprintf(retstr, "%s", "Success");
} else {
retstr = (char *)malloc(8);
sprintf(retstr, "%s", "Failure");
}
UnlockPixels(GetPortPixMap(theGWorld));
DisposeGWorld(theGWorld);
DisposeHandle((Handle)thePicHandle);
CloseMovieFile(refnum);
DisposeMovie(mv);
--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


More image processing

2003-12-30 Thread Ken Norris
Howdy,

On the Mac, what type of thing is an image in the clipboard?

on a Windows PC, what type of thing is an image in the clipboard?

What type of 'image' is the paint area of a Rev 1-byte/pixel image?

What type of 'image' is an image area pasted into a Rev image from the
clipboard?

What I did was copy an all black image from a HyperCard Color Tools external
pict editor and paste it into a Rev image. I didn't even know if it would
show up, but it did.

Now, I want to make it a windowShape mask.

I'm assuming I can go through the pixels and set all the white ones outside
the black area to transparent, but how do I retrieve the rectangular size of
the pasted area?

I know that's a few questions, so just pick your choices.

Mega-TIA, 
Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: USB mics supported by Record?

2003-12-30 Thread Thierry Arbellot
on MacOS X 10.2.8, QuickTime 6.5, USB Webcam Samsung Anycam MPC10
No problem to record sound in Rev.
Have you try to modify record parameters, like recordFormat, 
recordCompression ... ?

Thierry.

On Tuesday, Dec 30, 2003, at 21:18 Europe/Paris, Richard Gaskin wrote:

I have a USP mic that works great for recording in other apps, but when
using Rev's record sound command it only captures the very last bit of 
what
I'm recording.

I'm using "Default" as the recordInput, as there is no option 
specifically
for a USB mic and all other options generate an error when I attempt to
record.

Any of you have success with USB mics and the record sound command?

--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Converting a PicHandle to format for use with imageData

2003-12-30 Thread Trevor DeVore
On Dec 30, 2003, at 1:24 PM, Thierry Arbellot wrote:

Looks like the image in Rev doesn't have the same width and height as 
the grabbed picture.
If it's the case, adjust the width and height before putting the 
picture into the imageData
I have the image object set to the same size as the PixMap dimensions 
which is 320 x 240.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Converting a PicHandle to format for use with imageData

2003-12-30 Thread Thierry Arbellot
Okay, let's try something else.

I really think the problem is in the image resolution.

What about movieFrame.top and movieFrame.left ? Are there set to Zero ?

Otherwise, change the returned image size

rdata.length = (movieFrame.right-movieFrame.left) * 
(movieFrame.bottom-movieFrame.top) * 4;

On Tuesday, Dec 30, 2003, at 21:40 Europe/Paris, Trevor DeVore wrote:

On Dec 30, 2003, at 1:24 PM, Thierry Arbellot wrote:

Looks like the image in Rev doesn't have the same width and height as 
the grabbed picture.
If it's the case, adjust the width and height before putting the 
picture into the imageData
I have the image object set to the same size as the PixMap dimensions 
which is 320 x 240.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Macworld Seminar

2003-12-30 Thread Rod McCall
Hi,

Firstly thanks to everyone who has signed up for the seminar over the 
last few days, also don't forget we've got a series of special offers 
on right now - which means the tickets are selling fast!

If your around the San Francisco area during Macworld Expo 2004 the 
seminar is an ideal way to find out the true power of the user-centric 
Revolution and is suitable for new and experienced users alike.

Seminar Highlights
--
* Keynote by Kevin Miller, CEO of Runtime Revolution
* Dan Shafer, author of "Revolution: Software at the Speed of Thought"
* Teaching with Revolution Express, with Ro Nagey
* Net Applications: Beyond the Browser, with Richard Gaskin
* Introduction to using Revolution as a Common Gateway Interface, with 
Jacqueline Landman Gay
* Jerry Daniels will present a talk on developing cross-platform thin 
clients
* The Future of Revolution, with the Revolution development team

Plus:
* Geoff Canyon risks certain death with a pledge to build a working 
application for three platforms - while holding his breath!

Quick Details
--
When: 9th & 10th of January 2004
Where: Argent Hotel, just a step away from San Francisco's Moscone 
Center.

Pricing
--
Purchasers of Revolution can take advantage of some really special 
offers:
* Revolution Studio and Two-Day Seminar Pass - only $399 (half off the 
retail price)
* Revolution Enterprise and Two-Day Seminar Pass - only $999 ($600 off 
the retail price)

The standard price is $400 for both days, or $250 for either day. Lunch 
and coffee breaks are included. Attendees also receive a complimentary 
pass to Macworld Expo.

For more information just visit our website.

Hurry as the tickets are selling out fast.

Best,

Rod

Dr Rod McCall  www.runrev.com
Runtime Revolution Ltd
91 Hanover Street, Edinburgh, EH2 1DJ
t: +44 (0)131 718 4333 f: +44 (0) 131 718 4334
Runtime Revolution - User-Centric Development Tools
All incoming emails are subject to virus and spam checking, this may 
delay receipt and any response.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: USB mics supported by Record?

2003-12-30 Thread Dan Soneson
Any of you have success with USB mics and the record sound command?

Hi Richard,

I have had no trouble using a microphone headset plugged into an iMic. 
I do not use Revolution to set the input, however. I leave that up to 
the sound system preferences panel. I think I have even used a regular 
USB microphone and recorded nicely using OSX. I am still a bit shaky on 
using Rev in a standalone to record sound, but in the development 
environment everything works fine.

What system are you trying this with? Is the trouble present in the 
development environment or only in a standalone application?

Dan

Daniel B. Soneson
Director, Language Lab
Southern CT State University
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creating windowShapes in Rev

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 01:02 PM, Ken Norris wrote:

What's really needed is a full-blown image processor plugin, eh?
Yeah.  And maybe based on a library.


I have something, but it is ugly and really needs nested arrays.

Nested arrays? Do you mean you are creating some paint tools to 
accomplish
these tasks? Perhaps by examining what's under the tool point, 
changing the
arrays and redrawing when you save?
I got a little mixed up.

I want to have an image type or value.  An array as representation is a 
problem because I can't do this (at this time):

  get tint( over(img1,img2), 20)

So the first thing I want is to allow arrays to be full values.  I want 
a function to be able to return an array and in the same expression 
allow the array returned to be a parameter for another function.

I thought about putting pixel values into a nested array, but it might 
work to leave them at the highest level.  The problem with that is that 
full array operations would not work.  So, if pixel values are arrays, 
then it would be good if all the functions I need are array operations.

However, I have done well with packed numerical "arrays" that are 
implemented as binary strings.  The problem here is random access in 
changing values.  I have a feature request in that would make this much 
faster.  It would apply to any case of a substring being replaced with 
a string of the same length.

So any of those three wishes will help and all will.

However, if I finish this up, and I don't have those, then I will 
probably use "boxes" (arbitrarily nestable chunks that can be strings 
or binary or numbers or arrays) and I need to rebuild that.


You might also consider taking a picture with export snapshot to a
variable and then looking for white or some other color to make
transparent parts in the final picture.

If I 'export snapshot' into an 'image' will it automatically convert 
to an
image format, i.e., Rev's own 1-byte proprietary format?
I don't know.  I export to a variable as PNG.  I suspect this is the 
same as a PNG file, but I have not checked.  I set the text property of 
the image to the variable value.  An image shows up.  I don't know 
about the proprietary format.

I have gotten the impression that an image is stored as the original 
form and that is exploded for imageData, maskData and AlphaData, and 
perhaps for display.  If the image is modified then the exploded image 
is compressed as PNG.  I can be compressed as other formats when saved 
to disk.  The fact that there is both maskData and alphaData might mean 
there are alternate internal compressed formats or they might be 
historical.  I think I heard something about the first.  This is all 
much more than I know and is all guessing and vague memories.

By 8-bit do you mean a color table?  Does this mean I can lose colors 
if I modify an image with lots of colors and then save it?

If so, then I think I see a little of what you mean. If we use a 
proprietary
method, we *should* be able to do this:

1) If we can 'export snapshot' into an image, it should produce an 
8-bit
image rectangle with white pixels outside the paint area to the edges 
of the
rectangle.
Except I don't know about "8-bit", I'd say yes.

2) Use the maskData property to set all the white pixels to 
transparent.
Yes.  You can also apply this to images you import.  You might also get 
a little more complicated and consider colors almost white and pixels 
with a very low alpha.  Some images have picture or other data under 
transparent portions.

3) In order to facilitate a mask I can understand when I see it, I 
will want
to change all non-transparent pixels to black (or some other 8-bit 
color to
distinguish it from overlaid images for alignment purposes) during the
process.
That is OK.

You still have to go through every pixel and re-render, right?
Yes, but in the simplest case, you build a new maskData based on image 
data.  It will be fastest to accumulate in order.  This build does not 
need to know the height and width (formatted) because it makes a pixel 
transformation.

All this could be solved with a zoom control, a lasso tool, and some 
pixel
controls in Rev's Paint Palette, so that's on my wish list.
I think Photoshop has a magic eraser that effectively is a pour 
(paint-bucket) with a transparent color.  Something like that or 
allowing a transparent background would address this.  Or allow 
selecting transparency (alpha) in colors.

I understand that in this case there is nothing but an image ID to set 
the
stack to, but IMO it's still an unexpected deviation from the usual 
syntax.
I mean, looking at a script, you could easily mistake setting the 
stack to
another stack ID or something, without the designation of "image" or
"stack".
I thought that since an image ID is specified and not an image that the 
windowShape would follow the image.  That is a change to the image 
would show up in the windowShape.  In my

Copy/Paste selection of image with transparent portions (was Window External)

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 11:53 AM, Trevor DeVore wrote:

Wuold you be able to write an external to copy and paste a selection 
of an image with a transparent background in Revolution?

I think this is something that this is better to implement in the 
development environment rather than an external.
I agree.  An intrepid plugin tinkerer might be able to implement this 
in the mean time.  It might be possible to put such  image data on the 
stack packed into a string.

(I have seen other cases in which transparency is lost, but I don't 
know enough about Revolution images to guess why.  I suspect they are 
being coerced to an image type they should not be coerced to.)

Another good one would be the ability to paste images from other apps 
as actual size.  Now that might take an external to help, I don't know.

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: More image processing

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 01:25 PM, Ken Norris wrote:

I'm assuming I can go through the pixels and set all the white ones 
outside
the black area to transparent, but how do I retrieve the rectangular 
size of
the pasted area?
I want to know all those other things, too.  But, I might have a hint 
for this one.

I have seen the pasted image fill the card.  Is that what you see?  
(This is a pain, so I am on a watch for a clever way to get around 
this.)

The size of an image is the formatted width and the formatted height.  
If it hasn't been resized, that is the height and width.  (Yikes, I 
think that means I may have said something wrong about Trevor's 
problem.)

However, to do the white to transparent transform, you don't need to 
know.  Each pixel in imageData is four chars.  Each pixel in maskData 
is one char.  The number of pixels are the same.  Create a string 
adding one mask byte for each four image bytes.  Then set the maskData. 
 (All brain fluff; I have not done this, yet.)

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Copy/Paste selection of image with transparent portions (was Window External)

2003-12-30 Thread Trevor DeVore
On Dec 30, 2003, at 4:03 PM, Dar Scott wrote:
Another good one would be the ability to paste images from other apps 
as actual size.  Now that might take an external to help, I don't 
know.
That would be a good addition.  For images that are stored internally 
copying and pasting from your graphics app would be very handy.  You 
could probably create a plugin with a button that pasted the current 
clipboard into an image of the current stack.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: USB mics supported by Record?

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 01:18 PM, Richard Gaskin wrote:

I have a USP mic that works great for recording in other apps, but when
using Rev's record sound command it only captures the very last bit of 
what
I'm recording.
I think I remember a discussion on this some time back.  Or was that 
you?

(I often remember things from other worlds or that have not yet 
happened, so it might not be there.)

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: USB mics supported by Record?

2003-12-30 Thread michael
Hi Richard,

I haven't tried Rev on a Mac but on Windows if it's using QuickTime for recording, 
there is a lag between the time you hit record and it actually starts to record, 
presumably because it's loading QuickTime. I imagine on the Mac there wouldn't be a 
delay. I made a little test app for doing recording and it works in the development 
and when I built the app and tested on a couple of machines. And the delay in the 
recording start was apparent on the 3 machines I tested. This was without a USB 
microphone.

Are you on a PC or a Mac?

Michael

-Original Message-
From: Dar Scott [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 7:14 AM
To: How to use Revolution
Subject: Re: USB mics supported by Record?


On Tuesday, December 30, 2003, at 01:18 PM, Richard Gaskin wrote:

> I have a USP mic that works great for recording in other apps, but when
> using Rev's record sound command it only captures the very last bit of
> what
> I'm recording.

I think I remember a discussion on this some time back.  Or was that
you?

(I often remember things from other worlds or that have not yet
happened, so it might not be there.)

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: More image processing

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 01:25 PM, Ken Norris wrote:

On the Mac, what type of thing is an image in the clipboard?

on a Windows PC, what type of thing is an image in the clipboard?
From clipboardData in the Transcript Dictionary, these are _virtually_ 
PNG.

What type of 'image' is an image area pasted into a Rev image from the
clipboard?
I would guess PNG, then.  Maybe it can be saved as PNG and then that 
compared to the text of the image.  If equal, it was probably saved as 
PNG.

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Copy/Paste selection of image with transparent portions (was Window External)

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 04:13 PM, Trevor DeVore wrote:

On Dec 30, 2003, at 4:03 PM, Dar Scott wrote:
Another good one would be the ability to paste images from other apps 
as actual size.  Now that might take an external to help, I don't 
know.
That would be a good addition.  For images that are stored internally 
copying and pasting from your graphics app would be very handy.  You 
could probably create a plugin with a button that pasted the current 
clipboard into an image of the current stack.
I wonder what this would do?

  create image
  set the text of the last image to clipboard["image"]
Maybe this will also do something interesting:

  put clipboard["image"] into last image

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Referencing cells by column and row name

2003-12-30 Thread Mark Powell
Say I have 50 lines of tab-delimited data.  Each line represents one of the 50 U.S. 
states.  Each item within a line corresponds to some kind of data (population, area, 
etc.)  Is there any way using Rev's built-in commands to write something akin to 

get item "Population" of line "Colorado"

where Population and Colorado are not variables, but 'column' and 'row' names.  Is it 
possible to establish names in this way and retrieve data similarly to above?

Appreciate any and all suggestions

Mark Powell
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


save Custom Colors?

2003-12-30 Thread erik hansen

how do you save Custom Colors?
there is NO documentation.

thanks,

Erik

=
[EMAIL PROTECTED]http://www.erikhansen.org

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Referencing cells by column and row name

2003-12-30 Thread Dar Scott
On Wednesday, December 31, 2003, at 02:17 AM, Mark Powell wrote:

Say I have 50 lines of tab-delimited data.  Each line represents one 
of the 50 U.S. states.  Each item within a line corresponds to some 
kind of data (population, area, etc.)  Is there any way using Rev's 
built-in commands to write something akin to

get item "Population" of line "Colorado"

where Population and Colorado are not variables, but 'column' and 
'row' names.  Is it possible to establish names in this way and 
retrieve data similarly to above?
(I'm assuming the item delimiter is adjusted appropriately for item 
chunks.)

1.
Make Population and Colorado constants, or, if this must work among 
many scripts, globals set in initialization.

   get item Population of line Colorado of currentData

2.
Set up global arrays in initialization.
   get item data["Population"] of line state["Colorado"] of currentData

3.
Use functions.  The state function returns a line.  The datum function 
returns an item from a line.  The data is in a global.  Can't be used 
to change the value.

   get datum("Population", state("Colorado") )

4.
Use a function for each datum or state.  Colorado() returns the 
colorado line.  Population() returns the Pop item.  The data is in a 
global.  Can't be used to change the value.

   get Population( Colorado() )

5.
Switch to arrays.  The data array is in a global named data.
   get data["Population","Colorado"]

6.
Make an interpreter.  Replace item key words like "Population" with 
"item 4" and line key words like "Colorado" with "line 7 of stateData". 
 Then "do".

   MarkDo "get Population of Colorado"

That's enough to get you thinking, I hope.

Dar Scott



___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creating windowShapes in Rev

2003-12-30 Thread Ken Norris
Back again,

> Date: Tue, 30 Dec 2003 15:55:54 -0700
> From: Dar Scott <[EMAIL PROTECTED]>
> Subject: Re: Creating windowShapes in Rev

>> What's really needed is a full-blown image processor plugin, eh?
> 
> Yeah.  And maybe based on a library.
--
Especially if they can swing a few extras into it, like text shading, making
shape blends, controlling lighting effects, and placing text and images on
3D surfaces -- 4 really common uses of any reasonably modern paint program.

The problems for me come when I try to import something from one of my cheap
external paint programs that just don't show up properly in Rev images,
mainly because of cross-platform compatibility I think. I end up having to
additionally take them into PhotoShop or somewhere else and resetting
filetypes. Very time consuming experiments.
--
>> 1) If we can 'export snapshot' into an image, it should produce an
>> 8-bit
>> image rectangle with white pixels outside the paint area to the edges
>> of the
>> rectangle.
> 
> Except I don't know about "8-bit", I'd say yes.
--
Yes, I see what you mean. What I'm getting at is that maskData, like stuff
you paint with the Paint Palette, only works with 8-bit colors.
--
>> If I 'export snapshot' into an 'image' will it automatically convert
>> to an
>> image format, i.e., Rev's own 1-byte proprietary format?
> 
> I don't know.  I export to a variable as PNG.  I suspect this is the
> same as a PNG file, but I have not checked.  I set the text property of
> the image to the variable value.  An image shows up.  I don't know
> about the proprietary format.
---
Well, like I said, I'm only concerned with maskData at this juncture. I
don't know what the dynamic color range of a regular PNG is. If it is higher
than 8-bit, then it probably can't be used as a mask for windowShapes,
unless Rev somehow switches it into a Rev-proprietary 8-bit inmage.
---
>> You still have to go through every pixel and re-render, right?
> 
> Yes, but in the simplest case, you build a new maskData based on image
> data.  It will be fastest to accumulate in order.  This build does not
> need to know the height and width (formatted) because it makes a pixel
> transformation.
---
??? This is what I don't understand. How does it work? ImageData is a 32-bit
thing, 4 bytes/pixel. According to the docs, maskData is 8-bit (1
byte/pixel) only. I mean, sure, you can make a pixel which only uses 8 of
its 32 bits, but that doesn't change it's actual depth, IOW, it's still a 32
bit pixel, and I would think that any image made with it cannot be used as
maskData unless you convert it somehow.

So, is this the "transformation" you speak of? Again, how does it work? I
haven't succeeded in making an 8-bit mask from a 32-bit image in Rev. I can
do it very easily in other Mac-only venues, but not here, so far.

As much as I like industrial illustration, I guess I just have too much
artist in me. This is causing more brain-fade than I can handle for just
wanting a simple mask to precisely align with an imported windowShape image
without going through several other applications to create it.

I much appreciate your patience. I hope I can get my head wrapped around it
soon, or that someone comes up with a better approach.

Thanks,
Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creating windowShapes in Rev

2003-12-30 Thread Richard Gaskin
Ken Norris wrote:

> The problems for me come when I try to import something from one of my cheap
> external paint programs that just don't show up properly in Rev images,
> mainly because of cross-platform compatibility I think. I end up having to
> additionally take them into PhotoShop or somewhere else and resetting
> filetypes. Very time consuming experiments.

Have you tried GraphicConverter?



I have PhotoShop 7, rarely use it.  I create sliced graphics and UI elements
in Firewoks, but for simple touch-ups and convrsions I've not found anything
as efficient as the modestly-priced GraphicConverter. Best $35 investment I
ever made.
 
-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creating windowShapes in Rev

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 09:34 PM, Ken Norris wrote:

The problems for me come when I try to import something from one of my 
cheap
external paint programs that just don't show up properly in Rev images,
mainly because of cross-platform compatibility I think. I end up 
having to
additionally take them into PhotoShop or somewhere else and resetting
filetypes. Very time consuming experiments.
I often have problems with downloaded images.  I suspect that image 
file creators and/or Revolution are not handling some things correctly.

I have had very little success with pasting.  I import.

I just discovered that the PNG type you get from clipboard["image"] 
does not behave as I expected.

--
1) If we can 'export snapshot' into an image, it should produce an
8-bit
image rectangle with white pixels outside the paint area to the edges
of the
rectangle.
Except I don't know about "8-bit", I'd say yes.
--
Yes, I see what you mean. What I'm getting at is that maskData, like 
stuff
you paint with the Paint Palette, only works with 8-bit colors.
I looked at the data you get from the 'text' property of an image.  It 
is PNG.  The one I looked at had gamma info.  It had a palette with an 
alpha augmentation.

I don't know what you mean with maskData and 8-bit colors.

--
If I 'export snapshot' into an 'image' will it automatically convert
to an
image format, i.e., Rev's own 1-byte proprietary format?
I don't know.  I export to a variable as PNG.  I suspect this is the
same as a PNG file, but I have not checked.  I set the text property 
of
the image to the variable value.  An image shows up.  I don't know
about the proprietary format.
---
Well, like I said, I'm only concerned with maskData at this juncture. I
don't know what the dynamic color range of a regular PNG is. If it is 
higher
than 8-bit, then it probably can't be used as a mask for windowShapes,
unless Rev somehow switches it into a Rev-proprietary 8-bit inmage.
It is quite variable.

What I mean is that I know it works with PNG.  I think it did not work 
with some other type.  If you want to use export snapshot, then you 
might need to specify PNG.

However, you probably want _import_ snapshot and that avoids the whole 
issue.  Sorry about the bunny trail.


---
You still have to go through every pixel and re-render, right?
Yes, but in the simplest case, you build a new maskData based on image
data.  It will be fastest to accumulate in order.  This build does not
need to know the height and width (formatted) because it makes a pixel
transformation.
---
??? This is what I don't understand. How does it work? ImageData is a 
32-bit
thing, 4 bytes/pixel. According to the docs, maskData is 8-bit (1
byte/pixel) only. I mean, sure, you can make a pixel which only uses 8 
of
its 32 bits, but that doesn't change it's actual depth, IOW, it's 
still a 32
bit pixel, and I would think that any image made with it cannot be 
used as
maskData unless you convert it somehow.

So, is this the "transformation" you speak of? Again, how does it 
work? I
haven't succeeded in making an 8-bit mask from a 32-bit image in Rev. 
I can
do it very easily in other Mac-only venues, but not here, so far.
This should be a 10 to 20 line function in the simple case.  I'll send 
something later, I'm being called.

Dar Scott



___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creating windowShapes in Rev

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 10:04 PM, Dar Scott wrote:

So, is this the "transformation" you speak of? Again, how does it 
work? I
haven't succeeded in making an 8-bit mask from a 32-bit image in Rev. 
I can
do it very easily in other Mac-only venues, but not here, so far.
This should be a 10 to 20 line function in the simple case.  I'll send 
something later, I'm being called.
Off the top of my head...  This may take some fiddling to make work.

-- This function takes an imageData and the r,g,b of the color to be 
made transparent (key).
-- It returns a value suitable for maskData.
function maskOfImage imageD, r, g, b
local transp, opaq, maskD
  put null & numToChar(r) & numToChar(g) & numToChar(b) into colorKey
  put null into transp
  put numToChar(255) into opaq
  put empty into maskD  -- not needed
  repeat with i= 1 to size(imageD) step 4
 if (char i to i+3 of imageD) contains colorKey then  -- equals
put transp after maskD
 else
put opaq after maskD
 end if
  end repeat
  return maskD
end maskOfImage

Something like that.  It might be a byte too long or too short.

I use 'contains' instead of 'is' to avoid consideration of the string 
as a number.  There was a bug in which numbers could start with null 
and I don't know if the fix got into the latest version.  It has an 
unspecified target milestone.  I don't know how to interpret the 
Bugzilla target milestones, anyway.

Dar Scott



___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Copy/Paste selection of image with transparent portions (was Window External)

2003-12-30 Thread Dar Scott
On Tuesday, December 30, 2003, at 05:00 PM, Dar Scott wrote:

Another good one would be the ability to paste images from other 
apps as actual size.  Now that might take an external to help, I 
don't know.
That would be a good addition.  For images that are stored internally 
copying and pasting from your graphics app would be very handy.  You 
could probably create a plugin with a button that pasted the current 
clipboard into an image of the current stack.
I wonder what this would do?

  create image
  set the text of the last image to clipboard["image"]
This seems to do it, except the PNG image seems to be flawed.  Rats.

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution