No keep it to yourself I want top figure it out on my own ;)

Of course sharing is always good.

Adam H


On Fri, 25 Feb 2005 09:57:53 -0500, Katz, Dov B (IT)
<[EMAIL PROTECTED]> wrote:
> Thanks all. I wrote a java class to provide all the functionality.  So
> far it has
> 
> load(String fname)                      // Loads from file
> create(int width, int height);          // Create an image from scratch
> crop(int x,int y,int w,int h)           // Crop
> save(fname,JPEGCompressionQuality)  // Save with a specified Float for
> jpeg quality (0.0F -  1.0F )
> getInternalImage();               // a reference to the internally
> stored BufferedImage (after a load) so you can manipulate it further in
> a CFScript, etc...
> watermarkImage(String file, int x, int y, float alpha) // Watermark from
> an image file
> watermarkImage(BufferedImage img, int x, int y, float alpha) //
> Watermark from an existing buffered image
> Rotate(degrees)
> Sharpen(-10 thru 10)
> Brighten(-10 thru 10)
> 
> Want me to share it when I'm done?
> -----Original Message-----
> From: Adam Haskell [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 25, 2005 9:08 AM
> To: CF-Talk
> Subject: Re: null in cfc's
> 
> One option would be to look at New atlanta's newest version (6.2 beta),
> they include a cfimage tag (if I recall it does image downsizing but i
> could be remebering wrong). Another option is to just write a CFX
> instead of trying to do all this from within CF itself.
> As it was already said Java nulls were added in MX 7.
> 
> Adam H
> 
> On Fri, 25 Feb 2005 05:30:26 -0400, Dov Katz <[EMAIL PROTECTED]> wrote:
> > How can I pass null values into java calls or constructors (via
> cfscript) in CFMX 6.1?  I'm modifying image.cfc to add my own
> compression level control for JPEG.... Null doesnt seem to be
> recognized. I've even tried to make a bogus hashtable and do a get() on
> some random string key ,(which obviously returns null) ... then i get a
> complaint that null pointers are a nother name for undefined values...
> Please help.. (or provide a better method for downsampling JPG
> images)....
> >
> > Thanks
> > -Dov
> >
> > <cffunction name="writeImageCompressed" access="public"
> output="false">
> >      <cfargument name="outputFile" required="yes" type="string">
> >      <cfargument name="quality" required="no" type="numeric"
> > default="1.0">
> >
> >      <cfscript>
> >         var param=
> CreateObject("java","javax.imageio.ImageWriteParam");
> >         var locale= CreateObject("java","java.util.Locale");
> >         var jpg=
> CreateObject("java","javax.imageio.plugins.jpeg.JPEGImageWriteParam");
> >         var writer=imageIO.getImageWritersByFormatName("jpg").next();
> >         var iioimage=CreateObject("java","javax.imageio.IIOImage");
> >         var
> > ios=ImageIO.createImageOutputStream(outFile.init(arguments.outputFile)
> > );
> >
> >         jpg.init(locale.getDefault());
> >         jpg.setCompressionMode(param.MODE_EXPLICIT);
> >
> jpg.setCompressionQuality(JavaCast("float",arguments.quality));
> >         iioimage.init(myImage,null,null); /// HERE*******
> >
> >         writer.setOutput(ios);
> >         writer.write(null, iioimage,jpg);  /// HERE*******
> >         ios.flush();
> >         writer.dispose();
> >         ios.close();
> >      </cfscript>
> >   </cffunction>
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196533
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to