What is the best technique to resize a clip and overlay it on a difficult shape, like a broken piece or mirror?

What is the best technique to resize a clip and overlay it on a difficult shape, like a broken piece or mirror?

Best would be cutting a matte in Photoshop, or as Mr. Grenadier suggests, using Motion or After Effects - but here is a way to do it staying within FCP - see if this helps:
http://vimeo.com/34973575
MtD

Similar Messages

  • What is the best way to resize a clip

    What is the best way to resize a clip? I have some clips in 1280x720p and a B camera shot of the same person that was shot at 1440x1080p and I want to multi-edit them so they need to be the same size. Is there a way inside FCP to re-interpret the 1440x1080 to 1280x720 or do I have to Export them as smaller clips and re-import them? Just have a lot of clips so would be good to find a internal FCP way of doing it.

    Well Zeb, again with the insults. If you had just stated simply "What codec" are you using that would have been fine. But instead you decided to insult me and assume I knew nothing.
    FYI I started working with video in 1985 and was one of the first to use Digital Video in 1991 as a Software Developer. So I can assure you I know a lot about codecs and NLE having even written one once. One of the things I learned in IT was to always ask for the best route through a problem from the experts around you before wasting valuable time and money finding your own, and usually the dead-ends at that!
    So there you go, next time I'll mention the codec and next time if you could be more polite then things will progress more smothely on here

  • What is the best way to resize a JPEG and store it in the Filesystem

    Hi All,
    I have developped a CMS System that renders JPEGs if it does not have the images available within the desired width already. Within my development setup (Dell Latitude D800 with ubuntu dapper drake) everything works fine and fast, as expected. Then I uploaded the application to my V20Z Server with 4gb RAM and the systems performance goes to its knees. I have hooked in a Java Profiler to see where the problem is, and it showed me that it is hanging wthin
    sun.java2d.SunGraphics2D.drawImage(Image, int, int, ImageObserver) which I use to draw my Image to a BufferedImage. Below is my complete source code That I am using. Plus the orofiling results
    Do not be confused as I am using the Turbine Framework, which gives me a RawScreen which gives me Access to the HttpServletResponse...
    package de.ellumination.carmen.modules.screens;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.util.Locale;
    import javax.imageio.IIOImage;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageWriteParam;
    import javax.imageio.ImageWriter;
    import javax.imageio.plugins.jpeg.JPEGImageWriteParam;
    import javax.imageio.stream.ImageOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.log4j.Logger;
    import org.apache.turbine.modules.screens.RawScreen;
    import org.apache.turbine.util.RunData;
    import de.ellumination.carmen.om.ImagePeer;
    public class Image extends RawScreen
    public static final float DEFAULT_COMPRESSION_QUALITY = 1.0F;
    * Logger for this class
    private static final Logger log = Logger.getLogger(Image.class);
    @Override
    protected String getContentType(RunData data)
    return "image/jpeg";
    @Override
    protected void doOutput(RunData data) throws Exception
    int imageId = data.getParameters().getInt("id");
    int width = data.getParameters().getInt("width", -1);
    int height = data.getParameters().getInt("height", -1);
    HttpServletResponse response = data.getResponse();
    de.ellumination.carmen.om.Image image = ImagePeer.retrieveByPK(imageId);
    File imgFile = new File(image.getLocation());
    if(width > 0 || height > 0)
    outputScaledImage(imgFile, response, width, height);
    else
    outputImage(imgFile, response);
    private void outputScaledImage(File imageFile, HttpServletResponse response, int width, int height) throws Exception
    File scaledFile = new File(imageFile.getParent() + System.getProperty("file.separator") + width + "_" + imageFile.getName());
    if(scaledFile.exists())
    outputImage(scaledFile, response);
    else
    scaleImage(imageFile, scaledFile, width);
    outputImage(scaledFile, response);
    private void outputImage(File imageFile, HttpServletResponse response) throws Exception
    FileInputStream in = new FileInputStream(imageFile);
    response.setContentLength((int) imageFile.length());
    OutputStream out = response.getOutputStream();
    int bSize = 10240;
    byte[] buffer = new byte[bSize];
    int inBuffer = 0;
    while (inBuffer >= 0)
    inBuffer = in.read(buffer);
    if (inBuffer > 0)
    out.write(buffer, 0, inBuffer);
    * scales the image to its new size. while scaling the Image, the code first resizes the image using the new Width Parameter.
    * If the Image is to high after scaling, it then uses the Images height to determin the scaling Factor.
    * @param inputFile the original Image
    * @param outputFile the File to store the scaled image to
    * @param compressionQuality the compression Quality to use
    * @param newWidth the desired images width
    * @param newHeight the desired images height
    public static void scaleImage(File inputFile, File outputFile, float compressionQuality, int newWidth, int newHeight)
    try
    if (inputFile.exists())
    BufferedImage hiRes = ImageIO.read(inputFile);
    double scaleFactor = (double) newWidth / (double) hiRes.getWidth(null);
    int tempHeight = (int) (hiRes.getHeight(null) * scaleFactor);
    if (tempHeight > newHeight)
    scaleFactor = (double) newHeight / (double) hiRes.getHeight(null);
    int width = (int) (hiRes.getWidth(null) * scaleFactor);
    int height = (int) (hiRes.getHeight(null) * scaleFactor);
    scaleImage(outputFile, compressionQuality, hiRes, width, height);
    catch (IOException e)
    log.error("Unable to create the thumbnail " + outputFile.getAbsolutePath() + " from " + inputFile.getAbsolutePath() + " because of the following Reason.", e);
    * scales the image to its new size. while scaling the Image, the code first resizes the image using the new Width Parameter.
    * If the Image is to high after scaling, it then uses the Images height to determine the scaling Factor. This method uses the
    * default compression quality to store image data.
    * @param inputFile the original Image
    * @param outputFile the File to store the scaled image to
    * @param newWidth the desired images width
    * @param newHeight the desired images height
    public static void scaleImage(File inputFile, File outputFile, int newWidth, int newHeight)
    scaleImage(inputFile, outputFile, DEFAULT_COMPRESSION_QUALITY, newWidth, newHeight);
    * scales the image to its new size. while scaling the Image, the code first resizes the image using the new Width Parameter.
    * uses the highest image compression quality by default.
    * @param inputFile the original Image
    * @param outputFile the File to store the scaled image to
    * @param compressionQuality the compression Quality of the new Image
    * @param newWidth the desired images width
    public static void scaleImage(File inputFile, File outputFile, float compressionQuality, int newWidth)
    try
    if (inputFile.exists())
    BufferedImage hiRes = ImageIO.read(inputFile);
    double scaleFactor = (double) newWidth / (double) hiRes.getWidth(null);
    int width = (int) (hiRes.getWidth(null) * scaleFactor);
    int height = (int) (hiRes.getHeight(null) * scaleFactor);
    // draw original image to thumbnail image object and
    // scale it to the new size on-the-fly
    scaleImage(outputFile, compressionQuality, hiRes, width, height);
    else
    log.error("Unable to create the thumbnail " + outputFile.getAbsolutePath() + " from " + inputFile.getAbsolutePath() + " because inputFile not exists: " + inputFile.getName());
    catch (IOException e)
    log.error("Unable to create the thumbnail " + outputFile.getAbsolutePath() + " from " + inputFile.getAbsolutePath() + " because of the following Reason.", e);
    * scales the image to its new size. while scaling the Image, the code first resizes the image using the new Width Parameter.
    * uses the highest image compression quality by default.
    * @param inputFile the original Image
    * @param outputFile the File to store the scaled image to
    * @param newWidth the desired images width
    public static void scaleImage(File inputFile, File outputFile, int newWidth)
    scaleImage(inputFile, outputFile, DEFAULT_COMPRESSION_QUALITY, newWidth);
    * This private method actually scales the inputImage to the desired height, width and compression Quality
    * @param outputFile The File in which the Image should be stored.
    * @param compressionQuality The Compression Quality to be applied to the image
    * @param inputImage the original input Image
    * @param width the height of the new Image
    * @param height the width of the new Image
    * @throws IOException
    private static void scaleImage(File outputFile, float compressionQuality, BufferedImage inputImage, int width, int height) throws IOException
    BufferedImage lowRes = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
    java.awt.Image image = inputImage.getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH);
    ImageWriter writer = null;
    Iterator iter = ImageIO.getImageWritersByFormatName("jpg");
    if (iter.hasNext()) writer = (ImageWriter) iter.next();
    File outputPath = outputFile.getParentFile();
    if (outputPath != null)
    if (!outputPath.exists()) outputPath.mkdirs();
    lowRes.getGraphics().drawImage(image, 0, 0, null);
    ImageOutputStream ios = ImageIO.createImageOutputStream(outputFile);
    writer.setOutput(ios);
    ImageWriteParam iwparam = new JPEGImageWriteParam(Locale.getDefault());
    iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    iwparam.setCompressionQuality(compressionQuality);
    // save thumbnail image to OUTFILE
    writer.write(null, new IIOImage(lowRes, null, null), iwparam);
    writer.dispose();
    ios.close();
    image.flush();
    inputImage.flush();
    lowRes.flush();
    * scales the image to its new size. while scaling the Image, the code first resizes the image using the new Width Parameter.
    * If the Image is to high after scaling, it then uses the Images height to determin the scaling Factor.
    * @param inputImage the original Image
    * @param outputFile the File to store the scaled image to
    * @param compressionQuality the compression Quality to use
    * @param newWidth the desired images width
    * @param newHeight the desired images height
    public static void scaleImage(BufferedImage inputImage, File outputFile, float compressionQuality, int newWidth, int newHeight)
    try
    double scaleFactor = (double) newWidth / (double) inputImage.getWidth(null);
    int tempHeight = (int) (inputImage.getHeight(null) * scaleFactor);
    if (tempHeight > newHeight)
    scaleFactor = (double) newHeight / (double) inputImage.getHeight(null);
    int width = (int) (inputImage.getWidth(null) * scaleFactor);
    int height = (int) (inputImage.getHeight(null) * scaleFactor);
    scaleImage(outputFile, compressionQuality, inputImage, width, height);
    catch (IOException e)
    log.error("Unable to create the thumbnail " + outputFile.getAbsolutePath() + " because of the following Reason.", e);
    All Threads     702.570     100 %
    java.lang.Thread.run()     551.322     78 %
    de.ellumination.carmen.modules.screens.Image.doOutput(RunData)     170.666     24 %
    de.ellumination.carmen.modules.screens.Image.outputScaledImage(File, HttpServletResponse, int, int)     170.108     24 %
                             de.ellumination.carmen.modules.screens.Image.scaleImage(File, File, int)     170.108     24 %
                                  de.ellumination.carmen.modules.screens.Image.scaleImage(File, File, float, int)     170.108     24 %
                                       de.ellumination.carmen.modules.screens.Image.scaleImage(File, float, BufferedImage, int, int)     165.787     24 %
                                            sun.java2d.SunGraphics2D.drawImage(Image, int, int, ImageObserver)     165.189     24 %
                                            com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(IIOMetadata, IIOImage, ImageWriteParam)     397     0 %
                                            javax.imageio.ImageIO$ImageWriterIterator.next()     69     0 %
                                            javax.imageio.ImageIO.createImageOutputStream(Object)     47     0 %
                                            java.awt.image.BufferedImage.<init>(int, int, int)     36     0 %
                                            java.awt.Image.getScaledInstance(int, int, int)     23     0 %
                                            java.awt.image.BufferedImage.getGraphics()     21     0 %
                                       javax.imageio.ImageIO.read(File)     4.320     1 %
                        de.ellumination.carmen.om.BaseImagePeer.retrieveByPK(int)     557     0 %
                   de.ellumination.carmen.modules.screens.Index.doBuildTemplate(RunData, Context)     1.673     0 %
              org.apache.catalina.startup.Bootstrap.main(String[])     151.225     22 %
              org.quartz.core.QuartzSchedulerThread.run()     22     0 %
    Now I am looking for the Best way to solve my problem. Maybe I am wrong from the get go.
    Runtime Setup Java 1.5.0_04 Tomcat 5.5.12 V20z (AMD64 Opteron 4gb RAM)
    Any help is heighly appreciated
    Kind regards

    This is a bad thing to do with JPEGs. You're better off just reducing the 'q' if you want a smaller/faster/lower resolution image. That way you're throwing away resolution intelligently. Using scaling you're throwing resolution away unintelligently. I was on a project where 40,000 images were scaled when they should have been low-q'd. Don't do it.

  • What is the best technique for resetting a view?

    I was wondering what is the best technique for resetting the initial state of a view?
    I am creating a form and want to provide a reset button for the user.  I could write an initialize() method that my action handler calls, but I am wondering if the framework already provides this functionality in a more elegant way.
    If I write an initialize method, then I have to manually populate my fields with my context mappings in my initialize() code to mimic what happens automatically by the framework the first time the view is called.  This seems prone to error since this is duplicating the mapping logic.
    Michael

    Hi,
    Even though it boils down to the same logic, for consistency sake it is good to have the initialization logic coded in the inbound plug method and then to call the outbound plug on reset.This make more sense when you have multiple navigation possible to the same view through multiple inbound plugs.
    Else, have an initialization method.
    PS: check whether the reset() method of IWDContext make sense. This is helpful when you have remove dynamically added nodes and attributes.
    Thanks and Regards,
    Sam Mathew

  • We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • What is the best way to transfer my music and pictures from my old PC to my new Macbook Pro?

    What is the best way to transfer my music and pictures from my old PC to my new Macbook Pro?

    This may help;
    http://www.apple.com/support/macbasics/migration/
    Ciao.

  • What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed?

    What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed? I am running Mavericks and use an AirPort Time Machine to back-up all my files.

    Back up all data on the internal drive(s) before you hand over your computer to anyone. You need at least two independent backups to be completely safe. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you know how to restore to an empty drive.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • What is the best way of deploying a jsp and bc4j aplication

    Hi
    I would like to know what is the best way of deploying a jsp and
    bc4j aplication in ias 9i.
    thanks in advanced
    rjc

    In the page I simply referenced the facescontext directly... no need for a custom servlet.
    public void createcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletResponse resp = (HttpServletResponse)fc.getExternalContext().getResponse();
    Cookie userCookie = new Cookie("cookiename", "cookievalue");
    userCookie.setMaxAge(-1);
    userCookie.setMaxAge(3600);
    resp.addCookie(userCookie);
    return null;
    public String readcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext ec = fc.getExternalContext();
    Map cookiemap = ec.getRequestCookieMap();
    if (cookiemap != null) {
    Cookie cookie = (Cookie) cookiemap.get("cookievalue");
    return cookievalue;
    For reference I could not get getCookies() method of HttpServletRequest to work.. it would only return JSESSIONID.

  • What is the best way to back up photos and videos to a dvd from iPhoto, not in iPhoto format but just in jpeg format to access on either windows or mac

    what is the best way to back up photos and videos to a dvd from iPhoto, not in iPhoto format but just in jpeg format to access on either windows or mac

    When you export the videos out of iPhoto be sure to select Kind = Original.  Otherwise you'll just get an image file of the first frame of the video.
    OT

  • What is the best way to create E-Flyers and insert to Microsoft Outlook??

    What is the best way to create E-Flyers and insert to Microsoft Outlook??

    http://kb.mailchimp.com/article/how-to-code-html-emails
    Once created, the HTML document cab be placed in the Stationery folder.
    On a PC it's here.
    "C:\Program Files\Common Files\Microsoft Shared\Stationery"

  • What is the best way to reformat a mini and reinstall Mavericks

    What is the best way to reformat a mini and reinstall Mavericks?

    Hi ruthefrombenson!
    This article can help you erase your hard drive and reinstall Mavericks:
    OS X Mavericks: Erase and reinstall OS X
    http://support.apple.com/kb/PH14243
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • What is the best way to manage 5 users and 6 devices? We dont all want the same merged contacts, we dont all want the same calendar notes, music, pics etc etc.

    What is the best way to manage 5 users and 6 devices? We dont all want the same merged contacts, we dont all want the same calendar notes, music, pics etc etc.

    As long as it is pointed to iTunes it will be accessible via home sharing on Apple TV.
    http://support.apple.com/kb/HT1751?viewlocale=en_US&locale=en_US
    If these are commercial DVD's we can't comment on any conversion process.

  • What is the best Apple notebook for video editing and pro music creation?

    What is the best Apple notebook for video editing and pro music creation?
    I know I could opt for the most expensive and probably get what I want that way, but I´m not made of money, so what are your suggestions for minimum criteria and which would you recommend?

    MacBooks Pro are great Macs with a good hardware, so all of them will work for the use you want, but I think that you want the biggest display possible because of your uses. In this case, it has to be a 15-inch non-Retina MacBook Pro, with the settings you want. Note that, after buying the Mac, you can upgrade the HDD and memory without voiding the warranty, so you are free to install as much memory and the HDD size you want after buying it. It's my opinion, but you are free to do whatever you think it's better

  • What is the best subscription for use in US and Au...

    I regularly travel between US and Australia.  I have postal addresses in both locations and credit cards from both countries.  So I can purchase from either location.
    I want to be able to make calls to US land lines and Mobiles whilst in either countries.  What is the best subscription for me to buy and in which country should I purchase it?
    NOTE: I am not really concerned about calls to Australia.  I don't make that many and so am happy to pay as I go for the Australian calls.

    Probably best option would be Unlimited US&Canada subscription, which you can get if you are located in US.
    It will be displayed here: http://www.skype.com/go/subscriptions
    If you are outside of US or Canada then this subscription is not offered.
    It doesn't matter where you are located when placing calls, but with subscriptions it does matter where you are when purchasing.
    Andre
    If answer was helpful please mark it with Kudos and if issue is resolved mark it with solution. This will help other users find this answer more easily. Thanks in advance!

  • What is the best way to captue current date and time?

    I got a field in table to capute current date and time...i am
    using SQL Server.
    field name datatype length
    enter_datetime datetime 8
    What is the best way to get current date and time and insert
    to table?.
    Is this way?.
    <cfset curtime = 'dateformat(#now()#,'mm/dd/yyyy')&"
    "&timeformat(#now()#,'hh:mm:ss')'>
    This way looks like time is not entered correctly.
    or any other better way?.

    > get current date and time and insert to table?
    You can use cfqueryparam
    <cfqueryparam value="#now()#"
    cfsqltype="cf_sql_timestamp">
    Or as was suggested, set the default for your table column to
    getdate(). Then you won't have to insert anything. Sql server will
    do it automatically when a new record is created.

Maybe you are looking for

  • FCP does not work after sleep - asking for quartz extreme card

    Hi all, Well my 2 x 2.266 Dual Core Intel xeon with 5 gig memory is getting a little long in the tooth and I have started coming up against what I suspect is hardware issues. The OSX is 10.5.8 It has a blackmagic HD card as well as an ESATA rocketrai

  • How can I pass value between two pages or fragments?

    Hi, I am learning ADF nowadays. Now I come across the following problem. There are two pages or fragments in a bounded task flow, e.g. PageA&PageB. There is an inputtext on PageA.When I press an button on PageA with an action jumpping to PageB I want

  • Safari Not Showing Apple Pages

    Safari 4.0.5 is not displaying content from some of Apple.com's pages. In particular, so far, the download iTunes page is not displaying left hand column contents, the panel for the actual download. Also, the iPad video will not start. I get the page

  • PC users cannot see attachments. Why?

    When sending attachments to PC users, I get a lot of people saying that nothing was attached. I end up having to zip everything for PC users. Does anybody know what I'm doing wrong? thanks

  • IPhone stuck in 'connect to iTunes mode' and can't restore via iTunes!!!

    IInstalled new update last night. Then crashed and won't turn on, says connect to iTunes. I have tried to update and restore about 20 times but every time it says halfway through 'the iPhone could not be restored. An unknown error occurred (3) I have