How to resize media's visual component resolution

Hello dear:
How to resize visual component resolution?
example:
I have a movie,this movie's resolution is 800*600dpi,I want this movie's visual component is 600*520.
Thanks

public Dimension getPreferredSize() {
               int w = 0, h = 0;
               if (vc != null) {
                    Dimension size = vc.getPreferredSize();
                    w = size.width;
                    h = size.height;
               if (cc != null) {
                    Dimension size = cc.getPreferredSize();
                    if (w == 0)
                         w = size.width;
                    h += size.height;
               if (w < 160)
                    w = 160;
               return new Dimension(w, h);
these codes can't change movie's aspect ratio,eg one movie resolution is 600*500,I can't change this movie resolution to 400*400 on playing. The Transcode.java is chanage the movie file resolution, not my expect.
I wish the one movie resolution is 600*500,this movie full window in the JPanel that resolution is 400*400.

Similar Messages

  • Is it possible to resize a Visual Component?

    I have a visual component that plays and MPG file, but it does not respond to the size I set for it with the setSize method. It sizes it to whatever it wants to. Has anyone seen anything like this? If so, how do I fix it?

    I meet the same problem when i want to resize the component which return by
    calling getVisualComponent();
    Someone can help us?

  • How to resize my monitor resolution in OS X 10.5.8

    Hello I have a question I am new to mac and I was trying to resize my desktop resolution. I'm using a 720i TV utilizing the HDMI and using the convertor to make it DVI and for some reason when I use the 720 resolution its all off center and it won't let me resize it like it does in Windows but it works when i have it at 1280 x 960 problem is I don't want that resolution it doesn't look as good on my TV. I have tried everything and can't find any software that will allow me to do this. And I use the same monitor for my Windows machine and it works perfect PLEASE HELP

    Yeah..... I know that I want to know how to resize a resolution the 1280 x 720 doesn't show up right it's making everything go off the sides so I can't see everything on my desktop in windows my nvidia control panel would allow me to resize my monitor to fit any resolution i want to know how to do that on a mac

  • How to resize project without losing the image resolution?

    I am trying to resize a project that recorded in 1271 x 768
    px to 800 x 483 px. I did it by clicked 'Project' > 'Resize
    Project...'. But after resize, the resolution of the movie is not
    clear, became blur. How to resize the project so that I'll have
    clearer movie? Thanks.

    Hi obtis and welcome to our community
    Unfortunately, there is little you may do to avoid this. The
    best way to avoid it is to simply record initially at the size you
    need so you don't have to use the Resize function.
    Here's the deal. Captivate stores images in the project as
    bitmapped images. Otherwise known as "raster" images. Basically
    they are a mosaic that comprises the picture. Initially, all is
    well and is crystal clear. But when you scale down a raster or
    bitmapped image, you are simply moving all the picture elements
    (PixEls) closer together. They overlap and the computer will
    calculate new values for what color they should be. Depending on
    how much you are resizing, the clarity drop can be acceptable or
    horribly bad. The more you resize smaller the worse it gets.
    Hopefully this helps... Rick

  • How can I resize an image without losing resolution or using the crop tool? I am using Photoshop Elements 13 on a PC.

    How can I resize an image without losing resolution or using the crop tool? I am using Photoshop Elements 13 on a PC.

    Hi Peru Bob,
    I've tried two images, the results were:
    Image 1
    Jpg, original file size 923KB, dimensions 848px x 279px.
    After resizing to 848px x 180px with 72dpi, the file size decreased to 164KB.
    Image 2
    Jpg, original file size 809KB, dimensions 1200px x 1800px.
    After resizing to 668px x 722px with 72dpi, the file size decreased to 307KB.
    So, there seems to be a fair file size loss - is this to be expected?

  • I need to resize the visual component..help pls

    Here's the sample code:
    (Assuming that the player has already been realized)
    Component vc;
    vc = player.getVisualComponent();
    if ((vc = player.getVisualComponent()) != null){
         player.start();
         panel.add(vc);
    I need to reduce the size of the visual component from its default size (320x240). vc.setSize() and vc.setBounds() doesn't seem to work.
    Please help me out. Thank you.

    Hi,
    Please use getPreferredSize().
    e.g. as in PlayerPanel. Defntly works!
    Regards,

  • How to resize a photo from CameraUI?

    Hi there,
    i really need som help here. I cant seem understand how to resize an still image taken with the camera. Here are the code so far(also with the upload part). I just need a thumbnail to be uploaded to the server, not the HQ-image. Any ideas?
              Simple AIR for iOS Package for selecting a cameraroll photo or taking a photo and processing it.
              Copyright 2012 FIZIX Digital Agency
              http://www.fizixstudios.com
              For more information see the tutorial at:
              http://www.fizixstudios.com/labs/do/view/id/air-ios-camera-and-uploading-photos
              Notes:
              This is a barebones script and is as generic as possible. The upload process is very basic,
              the tutorial linked above gives information on how to post the image along with data to
              your PHP script.
              The PHP script will collect as $_FILES['Filedata'];
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              import flash.events.TouchEvent;
              import flash.ui.Multitouch;
        import flash.ui.MultitouchInputMode;
              import flash.media.Camera;
              import flash.media.CameraUI;
              import flash.media.CameraRoll;
              import flash.media.MediaPromise;
        import flash.media.MediaType;
              import flash.events.MediaEvent;
              import flash.events.Event;
              import flash.events.ErrorEvent;
              import flash.utils.IDataInput;
              import flash.events.IEventDispatcher;
              import flash.events.IOErrorEvent;
              import flash.utils.ByteArray;
              import flash.filesystem.File;
              import flash.filesystem.FileMode;
              import flash.filesystem.FileStream;
              import flash.errors.EOFError;
              import flash.net.URLRequest;
              import flash.net.URLVariables;
              import flash.net.URLRequestMethod;
                        // Define properties
                        var cameraRoll:CameraRoll = new CameraRoll();                                        // For Camera Roll
                        var cameraUI:CameraUI = new CameraUI();                                                            // For Taking a Photo
                        var dataSource:IDataInput;                                                                                          // Data Source
                        var tempDir;                                                                                                                        // Our temporary directory
                        CameraTest() ;
                        function CameraTest()
                                  Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
                                  // Start the home screen
                                  startHomeScreen();
                        // =================================================================================
                        // startHomeScreen
                        // =================================================================================
                        function startHomeScreen()
                                  trace("Main Screen Initialized");
                                  // Add main screen event listeners
                                  if(Multitouch.supportsGestureEvents)
                                            mainScreen.startCamera.addEventListener(TouchEvent.TOUCH_TAP, initCamera);
                                            mainScreen.startCameraRoll.addEventListener(TouchEvent.TOUCH_TAP, initCameraRoll);
                                  else
                                            mainScreen.startCamera.addEventListener(MouseEvent.CLICK, initCamera);
                                            mainScreen.startCameraRoll.addEventListener(MouseEvent.CLICK, initCameraRoll);
                        // =================================================================================
                        // initCamera
                        // =================================================================================
                        function initCamera(evt:Event):void
                                  trace("Starting Camera");
                                  if( CameraUI.isSupported )
                                            cameraUI.addEventListener(MediaEvent.COMPLETE, imageSelected);
                                            cameraUI.addEventListener(Event.CANCEL, browseCancelled);
                                            cameraUI.addEventListener(ErrorEvent.ERROR, mediaError);
                                            cameraUI.launch(MediaType.IMAGE);
                                  else
                                            mainScreen.feedbackText.text = "This device does not support Camera functions.";
                        // =================================================================================
                        // initCameraRoll
                        // =================================================================================
                        function initCameraRoll(evt:Event):void
                                  trace("Opening Camera Roll");
                                  if(CameraRoll.supportsBrowseForImage)
                                            mainScreen.feedbackText.text = "Opening Camera Roll.";
                                            // Add event listeners for camera roll events
                                            cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected);
                                            cameraRoll.addEventListener(Event.CANCEL, browseCancelled);
                                            cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);
                                            // Open up the camera roll
                                            cameraRoll.browseForImage();
                                  else
                                            mainScreen.feedbackText.text = "This device does not support CameraRoll functions.";
                        // =================================================================================
                        // imageSelected
                        // =================================================================================
                        function imageSelected(evt:MediaEvent):void
                                  mainScreen.feedbackText.text = "Image Selected";
                                  // Create a new imagePromise
                                  var imagePromise:MediaPromise = evt.data;
                                  // Open our data source
                                  dataSource = imagePromise.open();
                                  if(imagePromise.isAsync )
                                            mainScreen.feedbackText.text += "Asynchronous Mode Media Promise.";
                                            var eventSource:IEventDispatcher = dataSource as IEventDispatcher;
                                            eventSource.addEventListener( Event.COMPLETE, onMediaLoaded );
                                  else
                                            mainScreen.feedbackText.text += "Synchronous Mode Media Promise.";
                                            readMediaData();
                        // =================================================================================
                        // browseCancelled
                        // =================================================================================
                        function browseCancelled(event:Event):void
                                  mainScreen.feedbackText.text = "Browse CameraRoll Cancelled";
                        // =================================================================================
                        // mediaError
                        // =================================================================================
                        function mediaError(event:Event):void
                                  mainScreen.feedbackText.text = "There was an error";
                        // =================================================================================
                        // onMediaLoaded
                        // =================================================================================
                        function onMediaLoaded( event:Event ):void
                                  mainScreen.feedbackText.text += "Image Loaded.";
                                  readMediaData();
                        // =================================================================================
                        // readMediaData
                        // =================================================================================
                        function readMediaData():void
                                  mainScreen.feedbackText.text += "Reading Image Data.";
                                  var imageBytes:ByteArray = new ByteArray();
                                  dataSource.readBytes( imageBytes );
                                  tempDir = File.createTempDirectory();
                                  // Set the userURL
                                  var serverURL:String = "http://www.hidden_in_this_example.com/upload.php";
                                  // Get the date and create an image name
                                  var now:Date = new Date();
                                  var filename:String = "IMG" + now.fullYear + now.month + now.day + now.hours + now.minutes + now.seconds;
                                  // Create the temp file
                                  var temp:File = tempDir.resolvePath(filename);
                                  // Create a new FileStream
                                  var stream:FileStream = new FileStream();
                                  stream.open(temp, FileMode.WRITE);
                                  stream.writeBytes(imageBytes);
                                  stream.close();
                                  // Add event listeners for progress
                                  temp.addEventListener(Event.COMPLETE, uploadComplete);
                                  temp.addEventListener(IOErrorEvent.IO_ERROR, ioError);
                                  // Try to upload the file
                                  try
                                            mainScreen.feedbackText.text += "Uploading File";
                                            //temp.upload(new URLRequest(serverURL), "Filedata");
                                            // We need to use URLVariables
                                            var params:URLVariables = new URLVariables();
                                            // Set the parameters that we will be posting alongside the image
                                            params.userid = "1234567";
                                            // Create a new URLRequest
                                            var request:URLRequest = new URLRequest(serverURL);
                                            // Set the request method to POST (as opposed to GET)
                                            request.method = URLRequestMethod.POST;
                                            // Put our parameters into request.data
                                            request.data = params;
                                            // Perform the upload
                                            temp.upload(request, "Filedata");
                                  catch( e:Error )
                                            trace(e);
                                            mainScreen.feedbackText.text += "Error Uploading File: " + e;
                                            removeTempDir();
                        // =================================================================================
                        // removeTempDir
                        // =================================================================================
                        function removeTempDir():void
                                  tempDir.deleteDirectory(true);
                                  tempDir = null;
                        // ==================================================================================
                        // uploadComplete()
                        // ==================================================================================
                        function uploadComplete(event:Event):void
                                  mainScreen.feedbackText.text += "Upload Complete";
                        // ==================================================================================
                        // ioError()
                        // ==================================================================================
                        function ioError(event:Event):void
                                  mainScreen.feedbackText.text += "Unable to process photo";

    1. Create a BitmapData of the correct size of the full image
    2. Use BitmapData.setPixels to create pixel data from your byteArray
    3. Make a new Bitmap, Bitmap.bitmapData = BitmapData
    4. Create a matrix with the correct scaling factors for your thumbnail
    5. Create a new BitmapData the size of your thumb
    6. Use BitmapData.draw to draw your image data from the Bitmap to the new BitmapData with the scaling matrix
    7. Use BitmapData.getPixels to create a bytearray from your thumb BitmapData
    8. save it
    You'll have to look up the AS3 reference to see how all these methods work.

  • Play effect on dynamically created visual component

    Hi!
    Can someone please explain to me, how do I play effect on a visual component created in actionscript?
    Thanks, regards

    You can also set the target/targets property of the effect once you've created the instance in AS, just like you do in MXML code. So where in MXML you might have something like this:
         <mx:Button id="button" click="mover.play()"/>
          <mx:Move id="mover" target=""/>
    you would do the equivalent in actionscript like this:
         var button:Button = new Button();
         var mover:Move = new Move();
         mover.target = button;
         button.addEventListener(MouseEvent.CLICK, clickHandler);
         private function clickHandler(event:Event):void
              mover.play();
    There's no mystery here in launching effects from AS - it's the same properties and structures that you set up in MXML, just different syntactic ways of referring to the properties and events.
    Chet.

  • How to resize photoshop elements 11 window on mac? no green+

    How to resize photoshop elements 11 window on mac? no green+ button as off screen.  cannot rescale monitor - no option on macpro

    Go to system prefs>displays and set your resolution way down. Let OS X open with the new resolution. Then set it back up to the highest available resolution and the window should position itself correctly.

  • HELP: S10, how to resize or create new partion

    anybody can help me plz...
    how to resize or create new partion
    thanks... 

    Hi and welcome to the lenovo forum,
    the quickstart itself will/ is install/ed in hidden folders on the windows partition. Installed as a normal program and de-/re-installable ,  its available in the download driver section .
    Next ..that used free software has no spy/nag or virus in  ..
    Important is Do as a first step ,  backup/save the whole hdd  on an extra media external hdd i.e.because changing position and size you could loose your recovery function...!
    Resize and Partition/correction will easy managed by partioning tool in windows after apply it restarts and do the action for you...  
    Aware you can loose with grub and linux install your  recovery feature ... quickstart is totally independed about that..so if that proggy is activated in BIOS/or windows ...and you have installed i.e. linux, see whats happen when you start ... start ...quickstart will comes first , you can use quickstart or ... if you didnt press any key while starting (boot-progress) it will go further, grubloader comes up now you can choose boot to windows or linux ...
    a triple multi system ...
    sincerely KalvinKlein
    Thinkies 2x X200s/X301 8GB 256GB SSD @ Win 7 64
    Ideas Centre A520 ,Yoga 2 256GB SSD,Yoga 2 tablet @ Win 8.1

  • How to center webpage in Visual Webpack?

    Hi there!
    I've a problem. How to center webpage in Visual Webpack? I've searched but i can't find the correct answer =)
    Does anyone knows how to do it. Please tell me.....
    Best regards,
    chel_mes

    Hi!
    If You need to center component on the page, You can set for style property position and set value in %. Or You can add Panel Layout, add necessary components to it and then set for style property of Panel Layout position and set value in %.
    Thanks,
    Roman.

  • Help on getting Visual Component for processor

    hi all
    I am having problem with the processor, i am not able to get the
    Visual component and display it. Only the control panel component is being
    display. Can anyone tell me what might be wrong.
    thanx in advance

    hi
    Thanx for reply
    Actually I had created processor using MprocessorMOdel
    Now I want to show the monitor on my panel
    But i am not able to get that
    I am attaching the code
    Plzzzz help me out
    FileTypeDescriptor ftd = new FileTypeDescriptor(FileTypeDescriptor.MSVIDEO);
    pm = new ProcessorModel(dsVideo, formats, ftd);
    videoPlayer = Manager.createRealizedProcessor(pm);
    videoPlayer.addControllerListener(this);
    videoPlayer.start();
    }catch(Exception me){
    dsVideo.disconnect();
    mc=(MonitorControl)dsVideo.getControl("javax.media.control.MonitorControl");
    if(mc!=null)
    monitor = mc.getControlComponent();
    f.getContentPane().add(monitor, BorderLayout.CENTER);
    mc.setEnabled(true);
    this is the code
    dsVideo ----- datasource
    videoPlayer ------- RealizedProcessor
    mc-----------------MonitorControl
    Monitor ----------- component
    thanx in advance

  • How to resize

    how to resize the borders in border layout
    I have to increase the header
    (ie. north part of the border layout)
    Thanks in advance

    I hope this is not possibleIt is :)
    because BorderLayout.NORTH is a static final
    variableYes, but BorderLayout.NORTH is just a variable you use to tell the layoutmanager where to put the component, it has nothing to do with size.
    but if it is not possible means java fails to satisfy
    - its not acceptableHuh?
    Plz post ur way of approach and help me to overcome
    in this issuseActually, the BorderLayout API gives a nice example. You should read it.

  • NotRealizedError: Can not get visual component on an unrealized player

    Exception in thread "main" javax.media.NotRealizedError: Cannot get visual component on an unrealized player
         at com.sun.media.BasicPlayer.getVisualComponent(BasicPlayer.java:491)
         at com.sun.media.MediaPlayer.getVisualComponent(MediaPlayer.java:48)
         at com.jbe.core.jdk.test.VideoMetadataTest.main(VideoMetadataTest.java:24)
      Unable to handle format: mpeglayer3, 32000.0 Hz, 0-bit, Stereo, Unsigned, 8518.0 frame rate, FrameSize=9216 bits
    public static void main(String[] args) throws NoPlayerException, IOException  {
              URL url = new URL("file:C:/Video/Test.avi");
              Player player = Manager.createPlayer(url);
              player.realize();
              System.out.println(player.getVisualComponent());
         }This is my error log and my source code. Is there something I am doing wrong.? Please help me resolve this error.
    Thanks,
    Krishnan

    the AirPort Express will no longer allow me to double NAT it and just continues to give me an error that the DHCP range conflicts with the WAN IP address of the base station?
    Two possible fixes:
    1) Perform a Factory Default Reset on the Express to clear out all the old and conflicting settings, then reconfigure it again.
    2) Change the DHCP range settings.
    For example, if the Express is now set to provide IPs from say 192.168.1.2 to 192.168.1.200......change the setting to read something like 192.168.5.2 to 192.168.5.200.
    2) will likely allow you to bypass 1). But, I would still recommend that you do 1) as it is always a good idea to start from scratch when you are making changes to a device on a network.
    Tesserax will have other good ideas for you as well, I am sure.

  • I can't figure out how to resize my picture for my home or lock screens.

    I can't figure out how to resize my picture for my home or lock screens. It shouldn't be his difficult. Any suggestions? I'm running the latest software. Thanks.

    whichever app store you are connecting to, hyou need a credit card with an address in that country. Also, itunes gift cards must be in local currency too.
    If you are in japan, you need to use the japan app store

Maybe you are looking for

  • Images show in Console but don't show up in preview??

    I'm a novice website builder but know enough that I'm doing everything right!.. I add images to a page and shows up in Dreamweaver console but when I got to preview the page in Firefox now all of a sudden the images never appear!... why all of a sudd

  • Function and column

    Hi All, I have a function and a column with same name. No parameter passing into the function but function return type is number. I have a column name same as function name and datatype also number. In my query i want to use the return result of func

  • The folder 'itunes' is on a locked disk on windows

    Hello Support, i am getting this msg on my win7 when trying to open iTunes. the folder 'iTunes' is on a locked disk or you dont have write permission for this folder. please help what to do? thanks

  • Currency format problem while exporting as excel

    Hi I have to create a report for which the currency format should be $#,##0.00 and -$#,##0.00 for negative numbers. In the text form field of rtf template, I have selected number format and removed the portion ;($#,##0.00) from $#,##0.00;($#,##0.00).

  • IPhone 3Gs stops loading web sites   requires reboot

    I am having an issue where my iPhone 3Gs will not load webpages. If I do a hard reset on the phone, it will star working again. I am having to do this several times a day . Anyone have a solution ???