Saving NSView to Bitmap - (ScrollView)

I have an NSView subclass called StretchView. Here's what I want to do: Since the StretchView has scrollbars and is extended via those scrollbars I want to be able to grab the entire StretchView (including the area not visible on screen) and save that to a file.
// StretchView.h
#import <Cocoa/Cocoa.h>
@interface StretchView : NSView {
-(IBAction)saveImageButtonPushed(id)sender;
@end
// StretchView.m
#import "StretchView.h"
@implementation StretchView
-(IBAction)saveImageButtonPushed(id)sender
NSLog(@"saveImageButtonPushed");
NSBitmapImageRep *rep;
NSData *data;
NSImage *image;
[self lockFocus];
rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:[self frame]];
[self unlockFocus];
image = [[[NSImage alloc] initWithSize:[rep size]] autorelease];
[image addRepresentation:rep];
data = [rep representationUsingType: NSPNGFileType properties: nil];
//save as png but failed
[data writeToFile: @"asd.png" atomically: NO];
//save as pdf, succeeded but with flaw
data = [self dataWithPDFInsideRect:[self frame]];
[data writeToFile:@"asd.pdf" atomically:YES];
@end
The problem is, the png file that generated is only part of the ScrollView (I tried to change the "initWithFocusedViewRect:[self frame]];" to "initWithFocusedViewRect:[self bounds]];" but in vain).
Then I tried to save the NSView content as pdf file and this time the whole view content was grabbed successfully but the backgound color was gone(I've set the content view's background as red but in the pdf file the background was white).
Can anybody give a hint, thans^_^

Hello Ori,
There is an example in the National Instruments example program database
that does this. It seems that CVI 5.x does not have a function that saves a
bitmap
to a file. But this example does exactly that.
check it out at the following page:
http://digital.ni.com/explprog.nsf/2222373937d4e9a​38625666a00831a24/b1384a94
02f57b13862564c80053702c?OpenDocument
If the link is broken, go to http://www.ni.com/support/ and then go to
the Example programs database. I used the following search string
"cvi and file and bitmap".
Good luck,
Azucena
"Ori Idan" wrote in message
news:[email protected]..
> I have an image on canvas indicator and I would like
> to be able to save it into a bitmap file using LabWindows/CVI 5.0.1.
>
> Any advice?
> Thanks,
>
> --
> Ori Idan
> Helicon technologies LTD. National Instruments Alliance member in ISRAEL
>
> Email: [email protected]
> Home page: http://www.helicontech.co.il
> Tel: +972-6-6262353 Fax: +972-6-6262405
> ++++++++++++++++++++++++++++++++++++++++++++++++++​++++++++++++
> Things should be made as simple as possible but not simpler
> Albert Einstein
> ++++++++++++++++++++++++++++++++++++++++++++++++++​++++++++++++
>
>

Similar Messages

  • Saving/storing/exporting bitmaps created within .swf's on the user's harddrive or a server

    Hello,
    I know you can store variables in shared objects. Is there a way to save bitmaps created within the swf?
    So for example
    var myBitmap:BitmapData = new Bitmap(... etc.);
    //saveBitmap(myBitmap, "C:\...") ???
    Thanks?

    you're welcome.
    p.s. here's a link to the as2 solution i've used before, Quasimondo - Mario Klingemann's Flash Blog: Flash BitmapExporter: Compress and Save Images
    (p.s when using the adobe forums, please mark helpful/correct responses, if there are any.)

  • Saving a new bitmap image

    Hi,
    I am currently loading in images from a mysql database with
    php. I need to make thumbnails out of these images so have managed
    to get them to scale using xscale etc. Now it is at a smaller size
    can I save this as a new image to send back to the database?
    thanks
    Gavin

    the Robot class has a method to capture the screen in a given rectangle. you will then have a bufferedimage. i don't know how to store this, but there should be a possibility, to save it as jpeg or something like that.

  • Adding text boxes, etc on top of background image (bitmap)

    I have an image (saved as a bitmap that I created in a drawing program) and I want to add it as a background to one of my panels in my swing application. I need to be able to put stuff on top of it, such as text boxes, etc. What is the best way to get this image as the background????

    I converted the image to a jpg and tried to then used the code in the thread though my situation is a little different since I want to add the image as a backdrop of a JPanel which is inturn a tab on a JtabbedPane. I use the following code but it doesnt seem to work
    ImageIcon icon = new ImageIcon("backdrop.jpg");
    JPanel jPanel13 = new JPanel() {
    public void paintComponent(Graphics g)
    // Approach 2: Scale image to size of component
    Dimension d = getSize();
    g.drawImage(icon.getImage(), 0, 0, d.width, d.height, null);
    setOpaque(false);
    super.paintComponent(g);
    tabbedPane.add(jPanel13, "System Status");

  • Keep quality when saving pdf

    I am using Photoshop CS6: I also tried this on CS5 going through the same process as below with a little bit higher quality but not the original quality.
    I open a PDF, Pops up "Import PDF" I hit ok. I edit the PDF by using the marquee tool to select an area in the PDF that I want to delete. I delete it once the area is selected. Then I save the PDF using "save as...". Set the format to PDF, then hit "save". Pops up "Save Adobe PDF" hit "Save PDF".
    When I print off the original version of the PDF compared to the edited one the quality is a bit off. It fills up more space on the paper also. The first one is darker and overall crisper. Is there something I missed when saving the PDF to keep the same quality as it was before I edited it?
    I'm thinking I may be able to change quality in the pop messages I got but I don't want to mess anything else up.

    You mentioned: I open a PDF, Pops up "Import PDF" I hit ok . . .
    And when you were in the Import PDF dialog box what were the settings for Resolution, Color Mode. Bit Depth, Crop to?
    PDF is a container format that can have images that have different resolutions, color modes, live text, etc.
    When you Import a PDF that may have some of the above issues, Photoshop throws up a dialog box where you can change the settings because you are rasterizing the content. (if your PDF was saved from a bitmap/pixel editor you would likely NOT see the Import PDF dialog)
    The Import PDF dialog is there to warn you that you need to tell Photoshop HOW to process the PDF when opening.
    If you just hit OK, you are at the mercy of whatever settings were in the dialog box.
    To make this even more important, you need to realize that the settings are simply whatever was used for the previous conversion.
    So if your previous conversion was set at a low resolution like 72 ppi, then Photoshop will use this setting even if your PDF has a high resolution image of 300 ppi or more. Opening a 300 ppi image at only 72 ppi will make it low resolution and will look like crap.
    Also, this automatically raterizing the live text which would have printed sharp because it WAS vectors. but are NOW pixels at whatever resolution you used. Rasterized text at even at a high resolution will never look as good as the original live text.
    What was the original application that created the PDF?
    It is always best to go back to the original file in the original application and make changes there and produce a new PDF.
    What were you doing to the PDF in Photoshop, deleting some text, cropping the image, etc?
    If you had Acrobat Pro you would be able to make some changes without damaging the PDF.
    Rasterizing a PDF in Photoshop is never a good idea.

  • What's the RIGHT way to draw an image in the upper left corner?

    I have an NSView in a ScrollView and I'm trying to draw an image in it. The problem is that I want the upper left corner of the image locked to the upper left corner of the frame, instead of the lower left corner, which is what the View wants me to do. I will need to be able to zoom in and out, and rotate.
    currently, I have a kludge of a system where I calculate how much I have to translate my image based on the size of the image and the size of the window. In order to do this, I needed to create an extra view outside the scrollview, so that I could get the size of the window, not including decorations. Then I can calculate the size of the view based on the size of the image and the size of the window, and based on THAT, I can figure out where to translate the image to.
    My only other thought was to use the isFlipped: method, but that ends up reversing my image L-R which is bad.
    Is there another way I should be doing this?
    thanks.

    Ah, the problem is that the content view includes the control panel, and while I'm sure I can get access to the control panel, and find out it's size, and then calculate everything off that, it becomes messy, and my way is easier, and no more messy.
    And I never said this was HARD. I have already DONE it. It's just ugly, and I'm wondering if there is a better way to do it. Translating between coordinate systems is normal, but changing lower left to upper left origin is an artifact of the Mac's history with PDF and PS.
    If the way I'm doing it is the accepted normal way, then fine, just tell me that.

  • What size should my background layer image be for web?

    I'm doing a logo design for someone I know and he wants it placed ontop of a steel texture background. I've sourced out a good quality image but despite my diligence in trying to understand how image size and resolution works, I can't seem to grasp what I need to do with it. I've watched countless videos, but it must be a problem with the ol' brain in the head I have.
    This is most likely (at least for now) just for web. My main focus is just getting this right so that it looks crisp and sharp on screen.
    The image I have is 1024 x 1384 pixels 72dpi. So 14.2 inches wide by 19.2 inches high.
    Do I need to change this at all? I will be cropping the image, but I'm worried that I will make it too small and therefore it will need to be enlarged and I might encounter some blurring.
    Should I enlarge it? I heard this isn't the most ideal thing.
    72dpi is as high as the resolution needs to be for screen images, but is there any advantage in bumping that up? Why couldn't I just make it 300dpi for the heck of it?
    Do I need to pay attention to inches, or is that just good guide for when you are printing something?
    I'm honestly just trying to get my head around it all so that in the future I don't have to spend so much time figuring out what I need to do. Everything I read and any help is greatly appreciated.

    Bayne86 wrote:
    Ok be prepared for a dumb question...
    If you're telling me to forget dpi/ppi when working with screens, how come you then say to think in terms of pixels for screens and to double the resolution for retina screens? I'm obviously a bit confused about the terminology here..
    With screen based design work, design with pixels in mind. So if you design for a website that is 1140px in width, then that is your base target width. With retina screens the screen resolution is effectively doubled up, but the relative size of elements show on such a screen is ideally the same as if you would be working on a screen with half the resolution.
    Example iPad:
    old iPad: 1024x768px.
    new iPad retina: twice that: 2048*1536.
    Your logo would be rendered at the same size on both screens. Let's say at 800X400 on the older screen. Because the retina screen behaves like a 1024x768 screen in rendering all elements, but effectively doubles the available resolution, you would have to provide an ipad developer with a 1600x800 version, which can be used for both screens, and makes sure that it looks razor sharp on the retina screen.
    No ppi. No dpi. Think in pixels only. With 4k screens around the corner this will become even more harrowing. That is why we are currently seeing the return of true vector graphics for screen and interface development. To complicate matters, since this is a relatively new development a lot of information on the web is completely outdated. I would not trust most info that is much older than two years, and double check even that. Check out Apple's icon and graphic creation guide for more ideas:
    http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/I consImages/IconsImages.html
    Now, things become even more confusing once you decide the graphics have to be prepared for a fluid and/or responsive designed web page or application. That background graphic you chose will not work well at all on a web page background, because it does not seamlessly repeat. That means it will be automatically scaled up and down to cover the entire browser window frame. Using an ultra-high resoluton background image just will not do: it eats up video memory for breakfast, is slow on certain devices, and may take ages to download. For these reasons, and many more, you need to be efficient and clever.
    So I would choose a seamless repeating metal background with enough detail that does not stand out too much (otherwise it would be noticed too much as to repeat). Another trick is to provide a lower resolution alpha transparent png mask to add a soft lighting effect to the metal background, and perhaps the logo. That png mask could then be scaled up because you would not notice the low resolution at all - better, the mask would become fuzzier, which does not matter for a soft lighting mask! Even a 512x512 mask or lower would work very well.
    That logo of yours (second image) will NOT render as a vector at all. It must be saved as a bitmap.
    The logo in the last image could work as an SVG, and become completely scalable on a web page or in an application (depending on the support for SVGs)
    Bottom line is that, for web page development and for app development, seperate layered versions will be required for the highest quality and most flexible result. A merged version will probably be quite useless. At least, it would be for me as a website/app developer and UX designer. Ideally I would like access to the Photoshop file, but I will settle for high resolution png files for each element. And if vector files can be send to me as SVG files: YES PLEASE!
    So the question remains: what are the client's output requirements? Is this for a website? What are the target platforms? And so on. Also remember that most people probably would not notice the difference between a "normal" 1024x768 image and a retina version for a background like yours, because the focus would be on the logo. So another approach is to provide a lower resolution (smaller file sized!) background image, and a higher resolution logo image that takes advantage of retina resolutions. Our brains cannot differentiate a lot of detail in darks. Take advantage of this.
    Hope this helps a bit!

  • Need Help With An Application That Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated. :-)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • Need Help With An Application Which Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • Best way to save images streamed from web to device?

    We have an app for browsing a catalog that streams content from a web server. There is an image for each product, some in JPG format and some in PNG format. Our server is fast and reliable so everything has been running smoothly so far, but we'd like to give users the option of saving the data to their device so they don't have to stream every time. I've only worked with SharedObjects before, which are capped at 100kb and won't be useful in this situation.
    What would be the best approach for storing the images, and keeping them from being overwritten during updates? Saving an uncompressed Bitmap will use too much storage space. Adobe's JPEGEncoder class is completely useless as it takes 10-30 seconds to save a moderately-sized image on a typical device. It also doesn't make sense to re-encode the JPGs, and we need to preserve the transparency in the PNGs.
    Right now we're using a Loader to retrieve the images and using loader.content to access the image data in code. Is it possible to save the image file in its original format locally when it is downloaded with a Loader? We would want the images stored in the application data and not accessible through the gallery. As for saving the data for each product (e.g. price, description, etc), would the built-in SQLite support be sufficient or should we create our own files?
    Thanks for any tips!

    We typically use a native extension to do this, but it is certainly possible in ActionScript.
    When the file has been downloaded, we save it to the applicationStorageDirectory.
    Next time, we check to see if exists locally, if so - use that and don't download.
       var file:String = renameFile(_externalHttpImage);
       //see if we already have a copy of the image
       var loader:Loader = new Loader();
       var ba:ByteArray = new ByteArray();
       if( fileExists(file)){
        file = File.applicationStorageDirectory.resolvePath(file).nativePath;
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, local_loader_complete);
        loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorOnChargeFile);
        var f:File = File.applicationStorageDirectory.resolvePath(file);
        if( f.exists){
         var fs:FileStream;
         try {
          //now load the size of the file
          fs = new FileStream();
          fs.open(f, FileMode.READ);
          fs.readBytes(ba);
          //  trace("READ " + fs.readUTF());
          fs.close();
         catch(e:Error){
          trace( "Error Loading Image File  '" +file + ": " +  e.message+ "\n"+ e.getStackTrace());
        loader.loadBytes(ba);

  • Need to reduce the report size.

    Hi all,
    I am using CR2008, i have total 4 images(jpeg) in the header and footer. My problem is  size of the rpt file. i am getting 8MB for the blank report itself. so i cant able to export this file properly from my  application(.net)into .doc and RTF formats if the report having more than 20 pages. When i remove the whole images from the rpt the size is getting down to around 150KB.
        The DPI of the Image is 600 with same height and diffrent width.but the total image size is only 160Kb.i cant able to compromise the resolution of the image. While i am reducing the DPI, the size of the rpt is also decreasing. How can i overcome this problem without reducing the image resolution.
    Hope anyone will give the solution for this,
    Thanks in Advance,
    Salah.

    I ran into the same issue and was able solve the problem.
    When you insert a jpeg into a report, the jpeg is converted to a  bitmap so  for example a 200K jpg file can explode to 3 megs.
    I was able to solve the problem by opening my bitmap(which was black and white) in photoshop and converting the  bitmap to grayscale. Then when saving the converted bitmap I compressed the file.
    Then I inserted the image into the report as a OLE object which keep the new size of the file.
    Then the other thing you need to do is make sure you have Retain Original Color Depth check on under your report options so that the image will retain it resolution.

  • Last question Regarding the Artwork

    I have saved various jpegs bitmaps and Gifs to my C: Drive pictures Folder to go along with each different podcasts. I just want to know here where can I put them in my F: Drive and how can or if I can automatically make them come up in the Artwork section of each different podcasts? These are titles I grabbed off the various websites that have podcasts I subscribed too. If it is possible where do I put them in the F: Drive under what folder? I do have a complete copy of iTunes in F: Drive, but don't know what to do with the artwork (pictures) I saved?
    I do have Windows and the main thing is can they be set up automatically be put up each time I download a new podcast from the various programs? How?
    I appreciate your patience in these questions. You can either reply here or email me directly at [email protected]
    Thank you.
    Message was edited by: viper48

    Just put the code inside of the video tag like this:
    <video width="960" height="540" poster="cover1.jpg" duration="10:53" preload="auto">
         <source type="video/webm" src="salamala-stereo-chinese.webmvp8.webm" />
         <source type="video/h264" src="salamala-stereo-chinese.mp4" />
         <source type="video/ogg" src="salamala-stereo-chinese.theora.ogv" />
         <embed src="video/salamala-stereo-chinese.flv" type="application/x-shockwave-flash" width="960" height="540" allowscriptaccess="always"></embed>
    </video>
    Nick

  • Flash file is too big! Have tried everything!

    I am making a simple file with three images looping. I drew the images in Illustrator and have saved them as bitmap, jpeg, eps, png, gif...in varying sizes, I have put the resolution down to 70, I cannot get teh file any smaller than 670kb and max size for submission is 250kb.
    Ive read to use vectors instead of raster, but how do I save a file in illustrator so that it is considered still a vector?
    Is this what I need to do? Nothing fancy in my video, just less than 200 frames at 24fps
    Please help! The deadline for my project is in a couple days!
    [email protected]

    The biggest factor in file size is often the physical dimensions of the image. A 320 x 240 image uses 1/4 the pixels that a 640 x 480 image does, so file size is MUCH smaller.
    So the first thing is to design the image in the exact physical dimensions needed. NEVER scale the image after you add it to Flash.
    All the file formats that you mentioned are pixel based... bitmaps... so they will not work like a vector passed image... as one created (drawn) directly in Flash.
    Can you directly import into the Library the Illustrator (vector) image file? Then you can bypass the pixel based bitmap.
    Best of luck!
    Adninjastrator

  • Interpret an svg file from illustrator

    Anyone know of any guides which explain this. i have drew a circle in ms paint and saved it as bitmap, loaded it into illustrator and used live trace and saved it out as an svg. Looks like this <br /><br />i can follow it down to the point until after d=" which i assume is the most important bit. Anyone knows how this is understood by the program. Anyone know any programs that rasterise better than illustrator ????<br /><br /><?xml version="1.0" encoding="utf-8"?><br /><!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  --><br /><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><br /><svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"<br />      width="721.209px" height="720px" viewBox="0 0 721.209 720" enable-background="new 0 0 721.209 720" xml:space="preserve"><br /><g><br />     <g><br />          <path fill-rule="evenodd" clip-rule="evenodd" fill="#C86464" d="M8.409,0c237.6,0,475.199,0,712.8,0c0,240,0,480.001,0,720<br />               c-239.999,0-480.001,0-720,0C6.005,482.396-8.386,225.604,8.409,0z M267.609,216c-109.033,231.495,245.134,341.133,331.2,158.4<br />               c62.196-132.053-43.095-273.871-201.6-244.8C332.314,141.502,287.749,173.2 39,267.609,216z"/><br />          <path fill-rule="evenodd" clip-rule="evenodd" fill="#85C8C8" d="M397.209,129.6c158.505-29.07,263.796,112.748,201.6,244.8<br />               c-86.065,182.732-440.232,73.095-331.2-158.4C287.749,173.239,332.314,141. 502,397.209,129.6z"/><br />     </g><br /></g><br /></svg>

    You can't. PS doesn't do SVG and even if it did, it wouldn't retain SO vectors in teh way you probably expect it to. That's simply not how SVGs work. You will have to use Inkscape, Illustrator or otehr tools, if you realyl need vector SVGs.
    Mylenium

  • Problems with rasterisation

    Hey guys
    im new to the forum and come to you for any advice you may have.
    Basically i have an image(250x300px bitmap), and i want to reduce the size (eg 50% ) of the image so i have been looking at using the live trace. so i have been taking the bitmap tracing it and then saving the resulting bitmap.
    the problem i am having is when it all goes well till i save it as a bitmap and then the image becomes heavily distorted and blurred. I need anti0aliasing off btw.
    I have looked at the image at the reduced size and it looks fine, but when i click pixel preview (where it shows a preview of the rasterised image) it seems to rasterise very poorly. Let me give you an example, a pixel that is 1% black and 99% white, it makes this pixel black.
    I have looked at exporting the image as an svg and trying to rasterise it better but have had no improvements as yet.
    also looking at developing my own algorithm to rasterise the svg, but theres not alot of material out there.
    Anyone have any alternate suggestions or ideas.
    i would appreciate anything as i am pretty stuck as it is

    Richard,
    your original image (maybe after applying TRACE by AI) has
    16 colors. Save as AI-PDF and open by PhS with anti-aliasing.
    Then Save for Web, using GIF with 16 colors and Dithering.
    Mode Adaptive. You'll get a GIF with 16 optimized colors.
    Because of Dithering it's mostly not bad.
    You'll see the palette, the colors can be indicated and
    probably be stored in a table. For further handling save by
    a common format.
    The crucial question is now: your up to 16 colors - can you
    choose them arbitrarily in your printer ? Or do you have 16
    fixed colors ?
    An example: the device is not a printer but an embroidery
    machine. Instead of inks, yarn (thread ?) is used. Not a big
    problem to choose yarn with colors according to the GIF's
    palette.
    I did some tests, but because of the misleading information
    about the pixel size of the image these are no more relevant.
    I'm still believing that the approach by AI's TRACE is perhaps
    not bad.
    Best regards --Gernot Hoffmann

Maybe you are looking for