<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>AaronHardy.com &#187; svg</title>
	<atom:link href="http://aaronhardy.com/tag/svg/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronhardy.com</link>
	<description>For all your Aaron Hardy needs.</description>
	<lastBuildDate>Fri, 20 Apr 2012 14:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Studio J Online Scrapbooking</title>
		<link>http://aaronhardy.com/flex/studio-j-online-scrapbooking/</link>
		<comments>http://aaronhardy.com/flex/studio-j-online-scrapbooking/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 19:42:21 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[crafts]]></category>
		<category><![CDATA[digital]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[scrapbooking]]></category>
		<category><![CDATA[Studio J]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=851</guid>
		<description><![CDATA[Scrapbooking just went from crafty women huddled around piles of paper shreds to online digital awesomeness. Not that crafty women or piles of paper shreds aren&#8217;t awesome. Nay. But for many, this translates into finding babysitters or a willing spouse; finding large blocks of time; purchasing a gajillion expensive scissors, stamps, buttons, papers, and ribbons; [...]]]></description>
			<content:encoded><![CDATA[<p>Scrapbooking just went from crafty women huddled around piles of paper shreds to online digital awesomeness.  Not that crafty women or piles of paper shreds aren&#8217;t awesome.  Nay.  But for many, this translates into finding babysitters or a willing spouse; finding large blocks of time; purchasing a gajillion expensive scissors, stamps, buttons, papers, and ribbons; finding storage for such paraphernalia; and discovering craftiness from within.  I mean, seriously, does <a href="http://3.bp.blogspot.com/_Q1ewFxNaFHQ/SoDb83g9mnI/AAAAAAAAAbk/hjn-6J4BGaM/s1600-h/IMG_7885.JPG" target="_blank">this</a> or <a href="http://www.craftster.org/pictures/data/500/medium/126488_Messy_Room2.jpg" target="_blank">this</a> look fun to clean up?  I&#8217;ll pass.</p>
<p>For the last year and a half at <a href="http://mediarain.com" target="_blank">Rain</a> I&#8217;ve been working on <a href="http://studioj.com/" target="_blank">Studio J</a>, <a href="http://closetomyheart.com/" target="_blank">Close To My Heart</a>&#8216;s flagship online scrapbooking application.  It&#8217;s been quite a ride but the result is really quite revolutionary.<span id="more-851"></span></p>
<p>Here&#8217;s how it works.  Hop onto <a href="http://studioj.com/" target="_blank">Studio J</a>.  You don&#8217;t even need an account.  You can log in anonymously on the left side of the <a href="https://create.studioj.com/login" target="_blank">login page</a>.  Once the application opens, create a project.  Upload some photos.  Choose the kit (set of papers) you would like to use.  Choose the pattern (orientation of papers).  Choose from a few pre-designed mixes that will get you started out with a great-looking scrapbook spread.  Now drop in photos, brads, clasps, ribbons, and stickers.  Distress or swap papers at will.  Add some text.  The amount of customization possible for each of these elements really is amazing and Close To My Heart did their best to make it a powerful experience.  Once your spread is complete, you can order a copy that will be printed using CTMH&#8217;s super-high-quality printing process and materials and it will be shipped to your door.</p>
<p>I know it may sound like a sales pitch, but I really do think is a fantastic application of technology and CTMH put a lot of focus on giving customers what they want.  It was really fun to work on an app that gives users so much control.  To read a very fair review of Studio J, check out <a href="http://www.craftcritique.com/2010/09/scrapbooking-with-studio-j-by-close-to.html" target="_blank">this article by Craft Critique</a>.</p>
<h3>The Juicy Details</h3>
<p>You know how much I just loooove to talk about scrapbooking.  But oh how I love to talk tech so much more.  Here are some interesting tech aspects of Studio J particularly related to the frontend since that&#8217;s the portion with which I&#8217;m most acquainted:</p>
<p>For the most part, StudioJ is developed in Flex for the frontend and PHP on the backend.  The backend and assets are hosted on Amazon&#8217;s cloud infrastructure.  This provided some unique challenges but resulted in big scalability benefits.  For speed, some assets like user photos are uploaded directly to the cloud which requires an <a href="http://developer.amazonwebservices.com/connect/entry!default.jspa?categoryID=114&#038;externalID=1092">ActionScript Amazon API adapter</a> and a little trickery for integration with the rest of the backend.</p>
<p>To store a user&#8217;s spread data to be later edited and printed, we utilize SVG.  Every element on the spread in ActionScript has a counterpart element in an SVG document.  This translation and all the rotating, scaling, panning, colorizing, and other editing tools are provided by our in-house <a href="http://aaronhardy.com/flex/rain-svg/" target="_blank">Rain SVG</a> library.  This to me is the most powerful and distinctive part of the app.</p>
<p>To improve the user experience, we developed a queuing and caching system.  It allows us to cache assets (re-use the same bitmap data in multiple parts of the app and avoid Flex image item renderer flickering issues), prioritize HTTP requests (make sure whatever the user is viewing gets top priority), and even trigger timeouts and/or retry requests.  <a href="http://aaronhardy.com/flex/queue-n-cache/" target="_blank">I talked in-depth about this system at the 360|Flex conference</a> and Adobe is adding a similar system to the new <a href="http://opensource.adobe.com/wiki/display/flexsdk/Spark+Image" target="_blank">Spark image component</a> in Flex 4.5.</p>
<p>The new <a href="http://labs.adobe.com/technologies/textlayout/" target="_blank">Text Layout Framework</a> was used in providing text editing functionality on user spreads.  This <a href="http://forums.adobe.com/message/2793180" target="_blank">got a little tricky</a> when loading fonts at runtime.  It got even trickier when consolidating the undo history for multiple text flows into the spread&#8217;s overall undo/redo system.  Then we integrated custom support for <a href="http://aaronhardy.com/flex/size-text-to-container/" target="_blank">sizing text to a container</a>.</p>
<p>We used modules to reduce some of the initial app size and provide some domain logic distinction. We added image editing tools so you don&#8217;t have to drop into Photoshop to make some simple tweaks to your photos.  And the list goes on.</p>
<p>In the end, it&#8217;s an ambitious application and I&#8217;m glad I could contribute.  We have a lot of ideas for additional features and improvements and wish the best for its success.  Now <a href="http://create.studioj.com/" target="_blank">go try it out</a> and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/studio-j-online-scrapbooking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rain SVG</title>
		<link>http://aaronhardy.com/flex/rain-svg/</link>
		<comments>http://aaronhardy.com/flex/rain-svg/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 17:46:20 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[graphic editor]]></category>
		<category><![CDATA[product designer]]></category>
		<category><![CDATA[raster]]></category>
		<category><![CDATA[scalable vector graphics]]></category>
		<category><![CDATA[svg]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=255</guid>
		<description><![CDATA[Businesses win customers when they deliver what customers want. Customers get what they want when they can customize products to their own preferences. At Rain, where I work, we recognize the profit potential that clients can achieve with this concept and have created many applications allowing users to design their own products. How do we [...]]]></description>
			<content:encoded><![CDATA[<p>Businesses win customers when they deliver what customers want.  Customers get what they want when they can customize products to their own preferences.  At <a href="http://mediarain.com" target="_blank">Rain</a>, where I work, we recognize the profit potential that clients can achieve with this concept and have created many applications allowing users to design their own products.  How do we do it?  Let&#8217;s talk SVG.</p>
<p>Suppose we create a simple product designer containing a single rectangle.  The user can rotate, scale, position, and color the rectangle. The rectangle will then be printed in spectacular fashion on the customer&#8217;s very own poster.  So, Jim hops into the application and moves the rectangle to the center of the poster, doubles its size, colors it blue, then rotates it 45 degrees.  He then saves his design.</p>
<p>How is Jim&#8217;s design saved?  That is, how is Jim&#8217;s design described in such a way that (1) he can later re-open it and continue modifying his rectangle and (2) a printing shop can print his poster at virtually any size without degrading its quality?<span id="more-255"></span></p>
<p>The most common way to save an image is by using a <a href="http://en.wikipedia.org/wiki/Raster_graphics" target="_blank">raster format</a> such as gif or jpg.  While there are very good use cases for such formats, this is not one of them.  A raster format describes an image by using a grid of pixels with each pixel carrying a color value.  For example, the pixel at 1, 1 is red; the pixel at 1, 2 is green; and so on.  Put all the pixels together and your eye sees an image.</p>
<p>Raster images don&#8217;t fulfill our requirements for a couple reasons.  First, raster images have no knowledge of internal elements.  It doesn&#8217;t store information about which pixels belong to a rectangle and which belong to a circle.  An application may be able to analyze the pixels and make a good guess, but because the &#8220;grid of pixels&#8221; is only two-dimensional, once elements begin to overlap and become more complex even guessing turns impossible.  This would greatly restrict the ability for our application to re-load a user&#8217;s work for further editing.</p>
<p>Second, because raster images are a grid of pixels with each pixel carrying a color value, the image cannot scale to an arbitrary size without loss of apparent quality, otherwise known as pixelation.  To illustrate, imagine an image one inch wide that has 300 pixels on the first row of the pixel grid. You later decide you would like to print the image at two inches wide instead of one inch wide.  The 300 pixels now must be spread across an area twice as wide as the original.  While the image is made larger, no additional detail is available for the added area.  The human eye begins to notice this extrapolation of data resulting in a loss of apparent quality.</p>
<p>So how do we store the data then?  We use a <a href="http://en.wikipedia.org/wiki/Vector_graphics" target="_blank">vector format</a>.  Rather than storing image data in a pixel grid, vector graphics store data by using points, lines, curves, and shapes.  Because the descriptors are all based on mathematics, the image can be enlarged to an infinite size without loss of quality.  Likewise, a certain knowledge of the design&#8217;s individual elements is retained and can be used when loading a design for further editing.  Below is a graphical comparison of vector and raster (bitmap) art:</p>
<div style="background-color:#ffffff; padding: 12px; text-align: center">
<img src="http://aaronhardy.com/wp-content/uploads/2009/07/vectorbitmapexample.png" alt="Vector vs. Raster (bitmap)" title="Vector vs. Raster (bitmap)" width="350" height="450" class="aligncenter size-full wp-image-266" style="display:block; margin-left: auto; margin-right:auto" />
</div>
<p>In 1999, a group of industry leaders collaborated to make a vector specification called <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics" target="_blank">Scalable Vector Graphics</a> (SVG). Although other vector formats existed previously, they each carried various restrictions or encumbrances.  SVG was designed as a lightweight, open standard that could easily be used amongst a variety of applications on a variety of platforms.  Design and printing applications could easily store and exchange vector design information.</p>
<p>While SVG is a great format for storing design data, users still need an environment where they can interact with design elements and have all the functionality of a full application.  Using Flex, Rain is able to leverage both the ubiquitous Flash player browser plugin for interactivity and SVG for persistent storage.  Rain has developed a library which translates what users see in the browser to a SVG file stored on the server.  If users wish to continue editing their design, the SVG can be loaded back into the product designer.  When the user is ready to order, the SVG document can then be shipped off to the printer.</p>
<p>While that might seem impressive, the real power of Rain&#8217;s SVG library comes from the complementary tools built to empower clients and their users.  For starters, users can rotate, scale, crop, pan, color, add text, mask, draw, and drag-and-drop.  Clients can guide users by specifying specific areas to drag-and-drop photos, enabling or disabling certain tools for individual elements or types of elements, and providing pre-built design templates.</p>
<p>Because the library is our own, we can tweak it as necessary.  We understand that every product designer is unique and carries its own set of business rules and capabilities.  We have experience implementing product designers for a wide variety of products from logos to shirts to sports trading cards to keychains.  Dream away and we&#8217;ll make it happen, cap&#8217;n.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/rain-svg/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

