|By Ben Nadel||
|July 31, 2007 08:00 PM EDT||
Finally, ColdFusion 8 has incorporated image manipulation directly into the ColdFusion tag and scripting language. No more are we, as developers, chained to third-party products.
These products, while excellent in quality, just mean adding one more level of complexity to any application that requires server-side image manipulation. Now, with CFImage and an abundance of image-related functions, ColdFusion has done to image manipulation what it has done to almost every other aspect of Web applications development - it has made it simple.
Due to the wide array of image functionality in ColdFusion 8, I am going to try and break this tutorial up into several small and manageable parts. The first part will cover basic reading and writing of images using CFImage and the related image manipulation functions. But, before we get into that, let's just quickly touch upon these new features as a whole.
ColdFusion 8 has given us CFImage. CFImage provides us with tag-based access to only a small subset of the image functionality including:
- Retrieving information about an image
- Reading an image into memory
- Resizing an image
- Rotating an image
- Adding a border to an image
- Converting an image from one file format to another
- Creating a CAPTCHA image
- Writing an image to a file
- Writing an image to the browser
In addition to the CFImage tag, ColdFusion has introduced dozens of new image manipulation functions including:
The ColdFusion 8 CFImage tag and the image-related functions all deal with a new ColdFusion object:
Most of you are not going to care about this one all that much, but for those of you who are interested in the underlying Java methods of the coldfusion.image.Image object, I have listed them below (skip past this if you have no idea what I'm talking about). Please note that any underlying methods of the actual Java/ColdFusion objects are found by gathering object metadata and through reflection; none of these methods are documented or officially supported. If you choose to use them, you do so at your own risk and discretion.
- addBorder( int, java.lang.String, java.lang.String ) - returns: void
- blur( int ) - returns: void
- brighten() - returns: void
- clearRect( int, int, int, int ) - returns: void
- copyArea( int, int, int, int ) - returns: coldfusion.image.Image
- copyArea( int, int, int, int, int, int ) - returns: coldfusion.image.Image
- crop( float, float, float, float ) - returns: void
- draw3DRect( int, int, int, int, boolean, boolean ) - returns: void
- drawArc( int, int, int, int, int, int, boolean ) - returns: void
- drawCubicCurve( double, double, double, double, double, double, double, double ) - returns: void
- drawLine( int, int, int, int ) - returns: void
- drawLines( [I, [I, boolean, boolean ) - returns: void
- drawOval( int, int, int, int, boolean ) - returns: void
- drawPoint( int, int ) - returns: void
- drawQuadraticCurve( double, double, double, double, double, double ) - returns: void
- drawRect( int, int, int, int, boolean ) - returns: void
- drawRoundRect( int, int, int, int, int, int, boolean ) - returns: void
- drawString( java.lang.String, int, int, coldfusion.runtime.Struct ) - returns: void
- flip( java.lang.String ) - returns: void
- getBase64String( java.lang.String ) - returns: java.lang.String
- getClass() - returns: java.lang.Class
- getColor( java.lang.String ) - returns: java.awt.Color
- getCurrentGraphics() - returns: java.awt.Graphics2D
- getCurrentImage() - returns: java.awt.image.BufferedImage
- getExifMetadata( javax.servlet.jsp.PageContext )- returns: coldfusion.runtime.Struct
- getExifTag( java.lang.String, javax.servlet.jsp.PageContext ) - returns: java.lang.String
- getHeight() - returns: int
- getImageBytes( java.lang.String ) - returns: [B
- getIptcMetadata( javax.servlet.jsp.PageContext ) - returns: coldfusion.runtime.Struct
- getIptcTag( java.lang.String, javax.servlet.jsp.PageContext ) - returns: java.lang.String
- getSource() - returns: java.lang.String
- getWidth() - returns: int
- grayscale() - returns: void
- info() - returns: coldfusion.runtime.Struct
- initializeMetadata( javax.servlet.jsp.PageContext ) - returns: void
- invert() - returns: void
- overlay( coldfusion.image.Image ) - returns: void
- paste( coldfusion.image.Image, int, int ) - returns: void
- readBase64( java.lang.String ) - returns: void
- resize( java.lang.String, java.lang.String, java.lang.String ) - returns: void
- resize( java.lang.String, java.lang.String, java.lang.String, double ) - returns: void
- rotate( float, float, float, java.lang.String ) - returns: void
- rotateAxis( double ) - returns: void
- rotateAxis( double, double, double ) - returns: void
- scaleToFit( int ) - returns: void
- scaleToFit( java.lang.String, java.lang.String, java.lang.String ) - returns: void
- scaleToFit( java.lang.String, java.lang.String, java.lang.String, double ) - returns: void
- setAntiAliasing( java.lang.String ) - returns: void
- setBackground( java.lang.String ) - returns: void
- setColor( java.lang.String ) - returns: void
- setDrawingStroke( coldfusion.runtime.Struct ) - returns: void
- setDrawingStroke( float, int, int, float, [F, float ) - returns: void
- setRenderingHint( java.awt.RenderingHints$Key, java.lang.Object ) - returns: void
- setTranparency( double ) - returns: void
- setXorMode( java.lang.String ) - returns: void
- sharpen( float ) - returns: void
- sharpenEdge() - returns: void
- shear( float, java.lang.String, java.lang.String ) - returns: void
- shearAxis( double, double ) - returns: void
- translate( int, int, java.lang.String ) - returns: void
- translateAxis( int, int ) - returns: void
- write( java.lang.String, float ) - returns: void
- writeBase64( java.lang.String, java.lang.String, boolean ) - returns: void
|Michael 07/12/08 01:43:25 AM EDT|
The noisy ad is beyond annoying.
|Mike Ritchie 08/01/07 06:08:54 PM EDT|
I wonder if the CF team consulted with the developer of ImageCFC? It also was basically a wrapper for the underlying Java image functionality. Either way, this looks like an exceptionally useful tool. Do you need to instantiate the object using cfimage? Or is it possible to manipulate an image completely within cfscript?
|Sanjeev 07/15/07 10:07:34 PM EDT|
rename the CodFusion as ColdFusion !
Big Data, cloud, analytics, contextual information, wearable tech, sensors, mobility, and WebRTC: together, these advances have created a perfect storm of technologies that are disrupting and transforming classic communications models and ecosystems. In his session at @ThingsExpo, Erik Perotti, Senior Manager of New Ventures on Plantronics’ Innovation team, provided an overview of this technological shift, including associated business and consumer communications impacts, and opportunities it ...
Jul. 27, 2016 11:35 AM EDT
SYS-CON Events announced today that 910Telecom will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Housed in the classic Denver Gas & Electric Building, 910 15th St., 910Telecom is a carrier-neutral telecom hotel located in the heart of Denver. Adjacent to CenturyLink, AT&T, and Denver Main, 910Telecom offers connectivity to all major carriers, Internet service providers, Internet backbones and ...
Jul. 27, 2016 11:00 AM EDT Reads: 688
SYS-CON Events announced today that LeaseWeb USA, a cloud Infrastructure-as-a-Service (IaaS) provider, will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. LeaseWeb is one of the world's largest hosting brands. The company helps customers define, develop and deploy IT infrastructure tailored to their exact business needs, by combining various kinds cloud solutions.
Jul. 27, 2016 10:30 AM EDT Reads: 1,216
Manufacturers are embracing the Industrial Internet the same way consumers are leveraging Fitbits – to improve overall health and wellness. Both can provide consistent measurement, visibility, and suggest performance improvements customized to help reach goals. Fitbit users can view real-time data and make adjustments to increase their activity. In his session at @ThingsExpo, Mark Bernardo Professional Services Leader, Americas, at GE Digital, discussed how leveraging the Industrial Internet a...
Jul. 27, 2016 09:45 AM EDT Reads: 440
The cloud market growth today is largely in public clouds. While there is a lot of spend in IT departments in virtualization, these aren’t yet translating into a true “cloud” experience within the enterprise. What is stopping the growth of the “private cloud” market? In his general session at 18th Cloud Expo, Nara Rajagopalan, CEO of Accelerite, explored the challenges in deploying, managing, and getting adoption for a private cloud within an enterprise. What are the key differences between wh...
Jul. 27, 2016 09:30 AM EDT Reads: 2,062
SYS-CON Events announced today that Venafi, the Immune System for the Internet™ and the leading provider of Next Generation Trust Protection, will exhibit at @DevOpsSummit at 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Venafi is the Immune System for the Internet™ that protects the foundation of all cybersecurity – cryptographic keys and digital certificates – so they can’t be misused by bad guys in attacks...
Jul. 27, 2016 09:15 AM EDT Reads: 1,357
The best-practices for building IoT applications with Go Code that attendees can use to build their own IoT applications. In his session at @ThingsExpo, Indraneel Mitra, Senior Solutions Architect & Technology Evangelist at Cognizant, provided valuable information and resources for both novice and experienced developers on how to get started with IoT and Golang in a day. He also provided information on how to use Intel Arduino Kit, Go Robotics API and AWS IoT stack to build an application tha...
Jul. 27, 2016 09:15 AM EDT Reads: 1,149
Amazon has gradually rolled out parts of its IoT offerings in the last year, but these are just the tip of the iceberg. In addition to optimizing their back-end AWS offerings, Amazon is laying the ground work to be a major force in IoT – especially in the connected home and office. Amazon is extending its reach by building on its dominant Cloud IoT platform, its Dash Button strategy, recently announced Replenishment Services, the Echo/Alexa voice recognition control platform, the 6-7 strategic...
Jul. 27, 2016 09:00 AM EDT Reads: 455
For basic one-to-one voice or video calling solutions, WebRTC has proven to be a very powerful technology. Although WebRTC’s core functionality is to provide secure, real-time p2p media streaming, leveraging native platform features and server-side components brings up new communication capabilities for web and native mobile applications, allowing for advanced multi-user use cases such as video broadcasting, conferencing, and media recording.
Jul. 27, 2016 08:45 AM EDT Reads: 931
IoT generates lots of temporal data. But how do you unlock its value? You need to discover patterns that are repeatable in vast quantities of data, understand their meaning, and implement scalable monitoring across multiple data streams in order to monetize the discoveries and insights. Motif discovery and deep learning platforms are emerging to visualize sensor data, to search for patterns and to build application that can monitor real time streams efficiently. In his session at @ThingsExpo, ...
Jul. 27, 2016 08:45 AM EDT Reads: 1,065
Verizon Communications Inc. (NYSE, Nasdaq: VZ) and Yahoo! Inc. (Nasdaq: YHOO) have entered into a definitive agreement under which Verizon will acquire Yahoo's operating business for approximately $4.83 billion in cash, subject to customary closing adjustments. Yahoo informs, connects and entertains a global audience of more than 1 billion monthly active users** -- including 600 million monthly active mobile users*** through its search, communications and digital content products. Yahoo also co...
Jul. 27, 2016 08:00 AM EDT Reads: 599
There will be new vendors providing applications, middleware, and connected devices to support the thriving IoT ecosystem. This essentially means that electronic device manufacturers will also be in the software business. Many will be new to building embedded software or robust software. This creates an increased importance on software quality, particularly within the Industrial Internet of Things where business-critical applications are becoming dependent on products controlled by software. Qua...
Jul. 27, 2016 06:30 AM EDT Reads: 1,485
In addition to all the benefits, IoT is also bringing new kind of customer experience challenges - cars that unlock themselves, thermostats turning houses into saunas and baby video monitors broadcasting over the internet. This list can only increase because while IoT services should be intuitive and simple to use, the delivery ecosystem is a myriad of potential problems as IoT explodes complexity. So finding a performance issue is like finding the proverbial needle in the haystack.
Jul. 27, 2016 04:45 AM EDT Reads: 2,280
Machine Learning helps make complex systems more efficient. By applying advanced Machine Learning techniques such as Cognitive Fingerprinting, wind project operators can utilize these tools to learn from collected data, detect regular patterns, and optimize their own operations. In his session at 18th Cloud Expo, Stuart Gillen, Director of Business Development at SparkCognition, discussed how research has demonstrated the value of Machine Learning in delivering next generation analytics to imp...
Jul. 27, 2016 04:30 AM EDT Reads: 2,511
Large scale deployments present unique planning challenges, system commissioning hurdles between IT and OT and demand careful system hand-off orchestration. In his session at @ThingsExpo, Jeff Smith, Senior Director and a founding member of Incenergy, will discuss some of the key tactics to ensure delivery success based on his experience of the last two years deploying Industrial IoT systems across four continents.
Jul. 27, 2016 04:00 AM EDT Reads: 1,569
The 19th International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, Microservices and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportuni...
Jul. 27, 2016 02:15 AM EDT Reads: 2,612
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develo...
Jul. 27, 2016 02:15 AM EDT Reads: 1,480
Basho Technologies has announced the latest release of Basho Riak TS, version 1.3. Riak TS is an enterprise-grade NoSQL database optimized for Internet of Things (IoT). The open source version enables developers to download the software for free and use it in production as well as make contributions to the code and develop applications around Riak TS. Enhancements to Riak TS make it quick, easy and cost-effective to spin up an instance to test new ideas and build IoT applications. In addition to...
Jul. 27, 2016 12:00 AM EDT Reads: 1,952
Internet of @ThingsExpo, taking place November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with the 19th International Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world and ThingsExpo Silicon Valley Call for Papers is now open.
Jul. 26, 2016 11:00 PM EDT Reads: 2,626
IoT is rapidly changing the way enterprises are using data to improve business decision-making. In order to derive business value, organizations must unlock insights from the data gathered and then act on these. In their session at @ThingsExpo, Eric Hoffman, Vice President at EastBanc Technologies, and Peter Shashkin, Head of Development Department at EastBanc Technologies, discussed how one organization leveraged IoT, cloud technology and data analysis to improve customer experiences and effi...
Jul. 26, 2016 11:00 PM EDT Reads: 2,024