<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I wrote a simple form to upload images to the server, and I would like to create thumbnails for them automatically.<br><br>The way I ended up doing it is as follows:<br><br>saveEntry<br>&nbsp;&nbsp;&nbsp; | aForm newForm |<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; " add original file under name blahblahPng or whatever the image type is "<br>&nbsp;&nbsp;&nbsp; UGFileLibrary addFileNamed: title,'Png' contents: uploadedFile contents.<br><br>&nbsp;&nbsp;&nbsp; aForm := (PNGReadWriter createAFormFrom: uploadedFile contents) first.<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; " create thumbnail and save under name blahblahThumbPng "<br>&nbsp;&nbsp;&nbsp; newForm := aForm scaledToSize: (Point x: 50 y: 50).<br><br>&nbsp;&nbsp;&nbsp; " what I would have liked to do here is add the thumbnail to the file library "<br><br>&nbsp;&nbsp;&nbsp; " add item to art section "<br>&nbsp;&nbsp;&nbsp; UGArt addImage: (<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (UGArtItem<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; title: title path: title,'Png') artist: self session user; imageForm: aForm; thumbForm: newForm; yourself<br>&nbsp;&nbsp;&nbsp; ).<br><br>As you can see, I ended up using WAImageTag #form: rather than a url from the file library (or server directory, preferably). So what I would like to know are two things:<br><br>1) Forms are big? So throwing them around is cumbersome?<br>2) Is there a way to convert a Form back to a PNG without the whole mime thing?<br><br>Thanks!<br>RS<br>                                               <br /><hr />Hotmail: Free, trusted and rich email service. <a href='http://clk.atdmt.com/GBL/go/196390708/direct/01/' target='_new'>Get it now.</a></body>
</html>