Windows size doesn't adapt when switching displays

Hi everyone,
I have a macbook pro 13" 2012 that I often use with a docking station to plug it to a biger LCD screen. Everything is working perfectly well except that when I plug it off from the docking station, all application that were opened when I was plugged remain with the same size they had on my bigger display.
What I mean is, for exemple, full screen app will remain full screen but I'll only be able to see half of the windows when I work back on the original 13" screen. I guess this might be due to the fact that my LCD screen has a 1080p resolution while my 13" only have a 720p ? Is there anyway to force mac osx to resize all windows as per new display resolution, keeping the same ratio ?
Thanks in advance for your help.

What Mac OS X will do for you is to put at least some part of each window onto the remaining screen -- None are left completely off-screen.
Sorry, the rest is your problem. Re-size them or minimize them into the Dock before you disconnect the larger display.

Similar Messages

  • Adobe Reader, MS Office window size changing when switching displays

    I have a current generation (mid 2012) MBP with Retina Display running ML 10.8.3. I also have a Dell U2413 monitor, confgured for
    1920x1200 resolution, connected via a Thunderbolt to Display Port cable that came with the monitor.
    When I switch displays, Adobe reader, Excel, and Powerpoint all have their window sizes change dramatically. Reader
    shrinks to just the status bar and is tucked in the very bottom left hand corner (it took me quite some time to even see it
    was there at all); Excel windows expand dramatically to be much larger than full screen, and Powerpoint windows shrink
    to about 1.5" square. Other windows (Mail, Chrome, Safari, iTunes) change or move slightly but are more or less OK.
    I know this problem is expected when switching to an external monitor with dramatically lower resolution (e.g. old In Focus
    projectors) but I don't believe it should happen with a hi-res monitor like the one I'm using.
    I have compared this behaviour with other users running same SW versions and external monitors with the same
    resoultion and they don't see this problem so I'm guessing there's some configuration option or low level setting
    that is messed up.
    These window size changes happen going both from internal to external and external to internal. Any ideas?

    I have a current generation (mid 2012) MBP with Retina Display running ML 10.8.3. I also have a Dell U2413 monitor, confgured for
    1920x1200 resolution, connected via a Thunderbolt to Display Port cable that came with the monitor.
    When I switch displays, Adobe reader, Excel, and Powerpoint all have their window sizes change dramatically. Reader
    shrinks to just the status bar and is tucked in the very bottom left hand corner (it took me quite some time to even see it
    was there at all); Excel windows expand dramatically to be much larger than full screen, and Powerpoint windows shrink
    to about 1.5" square. Other windows (Mail, Chrome, Safari, iTunes) change or move slightly but are more or less OK.
    I know this problem is expected when switching to an external monitor with dramatically lower resolution (e.g. old In Focus
    projectors) but I don't believe it should happen with a hi-res monitor like the one I'm using.
    I have compared this behaviour with other users running same SW versions and external monitors with the same
    resoultion and they don't see this problem so I'm guessing there's some configuration option or low level setting
    that is messed up.
    These window size changes happen going both from internal to external and external to internal. Any ideas?

  • Windows vista home premium iTunes window size doesn't fit properly

    I am using windows vista home premium. In iTunes when I maximize the iTunes window, it doesn't fit the screen, it is a little too big and I cannot see the side scroll bar. To fix it, I have to restore the window, manually modify the size and the maximize it. Is there a fix to this? Or is an unknown little bug?

    Have you checked the HP Website and Microsoft Support websites to see if they have any solutions to your problem? Since there could be multiple things causing this, I would check at the places I mentioned first and see if their knowledge base contains an answer.
    *******DISCLAIMER********
    I am not an employee of BBY in any shape or form. All information presented in my replies or postings is my own opinion. It is up to you , the end user to determine the ultimate validity of any information presented on these forums.

  • Access Connections - IP doesn't change when switching locations

    In my Access Connections setup, I have a mix of profiles; some using DHCP & some using static IPs.
    I am experiencing problem when manually switching between profiles, where the IP address is not always changing as expected.
    For example:
    (all profiles are wired connections)
    Home (DHCP)
    IP address: Allocated by DHCP
    Subnet mask: Allocated by DHCP
    Default gateway: 10.0.0.1
    DNS servers: Allocated by DHCP
    Office 1 (Static)
    IP address: 203.18.x.x
    Subnet mask: 255.255.255.240
    Default gateway: 203.18.y.y
    DNS servers: 10.10.140.7, 10.10.140.12, 203.18.z.z
    Office 2 (Static)
    IP address: 10.10.140.202
    Subnet mask: 255.255.255.0
    Default gateway: 10.10.140.1
    DNS servers: 10.10.140.7, 10.10.140.12, 203.18.z.z
    Office 3 (DHCP)
    IP address: Allocated by DHCP
    Subnet mask: Allocated by DHCP
    Default gateway: <blank>
    DNS servers: 10.10.140.7, 10.10.140.12, 203.18.z.z
    On many occasions when switching from, say, "Office 2" to "Home"; the static IP address for Office 2 (10.10.140.202) is not being replaced by a new IP allocated from my home router (which, by the way is configured to allocate IPs from the pool 10.0.0.2 to 10.0.0.4; so the old IP address should not be valid on that network).
    What is even more interesting is when you take DHCP out of the equation, for example when switching from, say, "Office 2" to "Office 1" (both of which are static IP profiles). The IP address 10.10.140.202 (Office 2) should be replaced by the static IP 203.18.x.x (Office 1) in all cases. However on many occasions it is not, and I'm left with the previous IP allocated.
    Has anyone else noticed this behaviour?
    I've found that by switching back and forth between profiles, it eventually resolves itself (although sometimes up to 3 or 4 switches is required).

    AC 4.42 fail to assign a static IP when the OS is in spanish and the wireless device is Intel. In that case the problem was fixed with a patch that the support guys release.
    In your case, I don't know my friend.
    Have you tried using only Windows, without AC?
    Regards

  • Memory Leak in Preview.app when switching Display Profiles

    I found a weird memory leak in Max OS X Preview.app, which manifests itself when Display profiles (color calbration) is change. I wonder if anyone else can reproduce my experience.
    1. Open up "System Preferences" -> "Displays", switch to the "Color" tab. You'll need at least 2 available profiles in the list. (If you only have 1, you can create another using "Calibrate..." button to launch Display Calibration Assistant.
    2. Open an image file in Preview.app.  The larger, the better. Zoom in full size to maximize the effect of the bug. I repro'ed easily with this image: http://www.donporter.net/NewSchool/Color/Examples/Printer%20Test%20file.jpg
    3. Open up "Activity Monitor.app", and click on Preview to highlight it, so you can watch its memory usage.
    4. Switch back to "Diplays" Preference Pane. Using the arrow keys, toggle up and down between two different Display profiles.
    4a. At the same time, watch Preview's "Real Mem" in Activity Monitor, as well as the total "Active" memory.
    5. Each time you switch profiles,  Preview consumes more Active/Real memory, about 25MB per switch in my case. This continues until all physical memory is consumed, and then (I presume) starts swapping virtual memory to disk.
    6. Bring Preview to  foreground, and all the profile-induced memory usage is freed.
    Weird, wild stuff.

    Could it be possible that this is just the OS holding the memory for the app until another process requires it?  Do you find that the memory increase eventually causes the app to become unstable? 
    It might be best to open a new bug report on this over at bugbase.adobe.com.  When adding the bug, please include any source code, project or installer that will help us reproduce the issue internally.  If you'd like to keep your code private, feel free to email it directly to [email protected]  Once entered, please post back with the URL so that others effected can add their comments and votes.
    Thanks,
    Chris

  • Using 2nd Monitor Doesn't Reset When Switching To 1 Monitor Only

    FF4 was displayed on my 2nd monitor off of my laptop.
    I then powered-down and removed the 2nd monitor hookup.
    After rebooting with only the laptop monitor, FF4 opens (twice) with only a tiny window just large-enough to display the red-yellow-green buttons. Fortunately, upon clicking the green button, it expands into a normal window.
    Just an FYI.

    It's a LacieIIblueIV monitor.
    I delieted the files any still doesn't work.
    I recall one coworker encountering this before, and he switched the monitor connection to the other output on the graphics card (dual monitor support) and it worked fine for him. Unfortuantely I tried this and still didn't work...

  • HELP - In Windows XP mode, how do you switch display to projctor

    Hi,
    I am running Windows XP on a MacBook Pro and have not been able to get either a monitor or a projector to work with it. When I restart the computer, I can briefly see the Windows logo go through to the external monitor or projector but before the bot is finished the signal drops and the laptop boots up fine but there is no signal displayed on the monitor or projector.
    I tried both F7 and Fn F7 but this has no effect!
    Can anyone please help?
    Forever grateful.....

    use the remapper to turn on your hot key...and make sure the ATI hotkey poller service is running --go to start-admin tools-services-scroll down until you see it..turn it on by pressing start and change the status to automatic

  • Windows Phone camera App crash when switching to another page

    I am creating a Simple Face Detection App for Windows Phone in C#. I turn on my camera , everything works perfect and FaceDetector works too, but when I try to navigate to other page my App always crashes and I do not why. I tried to test my App in Windows
    Phone Emulator and here the navigation works. I also tried debug my App in real device, but there the method OnNavigatedFrom is never hit.
    FaceDetection.xaml.cs
    public partial class FaceDetection : PhoneApplicationPage
    #region member variables
    const string MODEL_FILE = "models/haarcascade_frontalface_alt.xml";
    FaceDetector.Detector _detector;
    int _downsampleFactor = 2;
    private byte[] _pixelDataGray;
    private byte[] _pixelDataDownsampled;
    private int[] _pixelDataGrayInt;
    private WriteableBitmap _wb;
    private DateTime _lastUpdate;
    public static int pocet = 5;
    double point1;
    double point2;
    double heightRectangle;
    double widthRectangle;
    #endregion
    public FaceDetection()
    InitializeComponent();
    _detector = new FaceDetector.Detector(XDocument.Load(MODEL_FILE));
    private void NewCameraFrame(object sender, CameraFrameEventArgs cameraFrameEventArgs)
    PageOrientation orientaciaObrazovky = ((PhoneApplicationFrame)Application.Current.RootVisual).Orientation;
    cameraViewer.UpdateOrientation(orientaciaObrazovky);
    var w = cameraViewer.CameraWidth;
    var h = cameraViewer.CameraHeight;
    if (_pixelDataGray == null || _pixelDataGray.Length != h * w)
    _pixelDataGray = new byte[w / _downsampleFactor * h / _downsampleFactor];
    _pixelDataDownsampled =
    new byte[w / _downsampleFactor * h / _downsampleFactor];
    _pixelDataGrayInt = new int[w / _downsampleFactor * h / _downsampleFactor];
    _wb = new WriteableBitmap(w / _downsampleFactor, w / _downsampleFactor);
    _lastUpdate = DateTime.Now;
    Utils.DownSample(cameraFrameEventArgs.ARGBData, w, h, ref _pixelDataGrayInt, _downsampleFactor);
    Utils.ARGBToGreyScale(_pixelDataGrayInt, ref _pixelDataGray);
    Utils.HistogramEqualization(ref _pixelDataGray);
    Utils.GrayToARGB(_pixelDataGray, ref _pixelDataGrayInt);
    List<FaceDetector.Rectangle> faces = new List<FaceDetector.Rectangle>();
    if (orientaciaObrazovky == PageOrientation.PortraitUp || orientaciaObrazovky == PageOrientation.PortraitDown)
    int scalw = w / _downsampleFactor;
    int scalh = h / _downsampleFactor;
    int[] _pixelDataGrayIntRotated = new int[scalw * scalh];
    for (int x = 0; x < scalw; x++)
    for (int y = 0; y < scalh; y++)
    _pixelDataGrayIntRotated[y + x * scalh] = _pixelDataGrayInt[x + y * scalw];
    faces = _detector.getFaces(
    _pixelDataGrayIntRotated,
    h / _downsampleFactor,
    w / _downsampleFactor,
    2f, 1.25f, 0.1f, 1, false, false); // height-width swapped
    else
    faces = _detector.getFaces(
    _pixelDataGrayInt,
    w / _downsampleFactor,
    h / _downsampleFactor,
    2f, 1.25f, 0.1f, 1, false, false);
    var elapsed = (DateTime.Now - _lastUpdate).TotalMilliseconds;
    _pixelDataGrayInt.CopyTo(_wb.Pixels, 0);
    _wb.Invalidate();
    Dispatcher.BeginInvoke(delegate()
    cnvsFaceRegions.Children.Clear();
    foreach (var r in faces)
    System.Windows.Shapes.Rectangle toAdd = new System.Windows.Shapes.Rectangle();
    TranslateTransform loc = new TranslateTransform();
    if (orientaciaObrazovky == PageOrientation.PortraitUp)
    loc.X = r.X * _downsampleFactor / (double)w * cnvsFaceRegions.ActualWidth;
    loc.Y = r.Y * _downsampleFactor / (double)w * cnvsFaceRegions.ActualHeight;
    point1 = r.X;
    point2 = r.Y;
    else if (orientaciaObrazovky == PageOrientation.PortraitDown)
    loc.X = r.X * _downsampleFactor / (double)w * cnvsFaceRegions.ActualWidth;
    loc.Y = r.Y * _downsampleFactor / (double)w * cnvsFaceRegions.ActualHeight;
    point1 = r.X;
    point2 = r.Y;
    else if (orientaciaObrazovky == PageOrientation.LandscapeLeft)
    loc.X = r.X * _downsampleFactor / (double)w * cnvsFaceRegions.ActualWidth - 50;
    loc.Y = r.Y * _downsampleFactor / (double)w * cnvsFaceRegions.ActualHeight + 90;
    point1 = r.X;
    point2 = r.Y;
    else if (orientaciaObrazovky == PageOrientation.LandscapeRight)
    loc.X = r.X * _downsampleFactor / (double)w * cnvsFaceRegions.ActualWidth+50 ;
    loc.Y = r.Y * _downsampleFactor / (double)w * cnvsFaceRegions.ActualHeight -90;
    point1 = r.X;
    point2 = r.Y;
    toAdd.RenderTransform = loc;
    toAdd.Width = r.Width * _downsampleFactor + 50;
    toAdd.Height = r.Height * _downsampleFactor + 50;
    toAdd.Stroke = new SolidColorBrush(Colors.Red);
    cnvsFaceRegions.Children.Add(toAdd);
    widthRectangle = toAdd.Width;
    heightRectangle = toAdd.Height;
    point1 = (loc.X);
    point2 = (loc.Y);
    protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    base.OnNavigatedTo(e);
    cameraViewer.SaveToCameraRoll = true;
    cameraViewer.NewCameraFrame += NewCameraFrame;
    cameraViewer.StartPumpingFrames();
    CameraButtons.ShutterKeyHalfPressed += OnButtonHalfPress;
    CameraButtons.ShutterKeyPressed += OnButtonFullPress;
    CameraButtons.ShutterKeyReleased += OnButtonRelease;
    protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
    base.OnNavigatedFrom(e);
    cameraViewer.StopPumpingFrames();
    CameraButtons.ShutterKeyHalfPressed -= OnButtonHalfPress;
    CameraButtons.ShutterKeyPressed -= OnButtonFullPress;
    CameraButtons.ShutterKeyReleased -= OnButtonRelease;
    private void OnButtonHalfPress(object sender, EventArgs e)
    cameraViewer.NewCameraFrame -= NewCameraFrame;
    private void OnButtonFullPress(object sender, EventArgs e)
    SaveScreenShots();
    private void OnButtonRelease(object sender, EventArgs e)
    cameraViewer.NewCameraFrame += NewCameraFrame;
    private static WriteableBitmap CropImage(WriteableBitmap source, int xOffset, int yOffset, int width, int height)
    var sourceWidth = source.PixelWidth;
    var result = new WriteableBitmap(width, height);
    for (var x = 0; x <= height - 1; x++)
    var sourceIndex = xOffset + (yOffset + x) * sourceWidth;
    var destinationIndex = x * width;
    Array.Copy(source.Pixels, sourceIndex, result.Pixels, destinationIndex, width);
    return result;
    private void SaveScreenShots()
    string namePerson = PhoneApplicationService.Current.State["TextBoxValue"] as String;
    bool b = cnvsFaceRegions.Children.Any();
    cnvsFaceRegions.Children.Clear();
    if (!b)
    MessageBox.Show("No face detected ");
    else
    for (int j = 1; j <= pocet; j++)
    using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())
    var bmp = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight);
    bmp.Render(this, null);
    byte[] bb = EncodeToJpeg(bmp);
    bmp.Invalidate();
    WriteableBitmap bmp2 = CropImage(bmp, (int)point1, (int)point2, (int)widthRectangle, (int)heightRectangle);
    using (var isoFileStream = isoStore.CreateFile(namePerson + j))
    System.Windows.Media.Imaging.Extensions.SaveJpeg(bmp2, isoFileStream, bmp.PixelWidth, bmp.PixelHeight, 0, 100);
    isoFileStream.Close();
    MessageBox.Show("Saved successfully " + pocet + " images");
    cameraViewer.NewCameraFrame += NewCameraFrame;
    public byte[] EncodeToJpeg(WriteableBitmap wb)
    using (MemoryStream stream = new MemoryStream())
    wb.SaveJpeg(
    stream,
    wb.PixelWidth,
    wb.PixelHeight,
    0,
    85);
    return stream.ToArray();
    private void cameraViewer_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
    cameraViewer.NewCameraFrame -= NewCameraFrame;
    private void cameraViewer_MouseLeftButtonUp_1(object sender, MouseButtonEventArgs e)
    SaveScreenShots();
    private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
    NavigationService.Navigate(new Uri("/PersonAndGallery;component/Gallery.xaml", UriKind.Relative));
    CameraViewer.cs
    public class CameraFrameEventArgs : RoutedEventArgs
    public int[] ARGBData { get; set; }
    public static class AppGlobal
    public static bool isPortrait = true;
    public class CameraViewer : Grid
    #region Events
    public EventHandler<CameraFrameEventArgs> NewCameraFrame { get; set; }
    public EventHandler<ContentReadyEventArgs> NewCameraCaptureImage { get; set; }
    public EventHandler<CameraOperationCompletedEventArgs> CamInitialized { get; set; }
    #endregion
    #region Properties
    public int CameraWidth
    get { return _cameraWidth; }
    set { _cameraWidth = value; }
    public int CameraHeight
    get { return _cameraHeight; }
    set { _cameraHeight = value; }
    public bool PhotoOnPress
    get { return _photoOnPress; }
    set
    _photoOnPress = value;
    // CameraButtons.ShutterKeyPressed -= CameraButtonsOnShutterKeyPressed;
    if (_photoOnPress)
    // CameraButtons.ShutterKeyPressed += CameraButtonsOnShutterKeyPressed;
    public bool SaveToCameraRoll { get; set; }
    public PhotoCamera Camera
    get { return _camera; }
    public bool TakingPhoto
    get { return _takingPhoto; }
    #endregion
    #region Member Variables
    private PhotoCamera _camera; // the windows phone camera that takes the photos
    private int _cameraWidth = -1;
    private int _cameraHeight = -1;
    private Thread _pumpFramesThread;
    private static ManualResetEvent _pauseFramesEvent = new ManualResetEvent(true);
    private bool _takingPhoto;
    VideoBrush viewfinderBrush;
    private bool _photoOnPress;
    private SoundEffect _cameraShutterSound;
    private static ManualResetEvent _cameraCaptureEvent = new ManualResetEvent(true);
    private static ManualResetEvent _cameraInitializedEvent = new ManualResetEvent(false);
    private bool _pumpFrames;
    #endregion
    #region Constructor
    public CameraViewer()
    Unloaded += new RoutedEventHandler(OnUnloaded);
    PhotoOnPress = true;
    public override void OnApplyTemplate()
    base.OnApplyTemplate();
    #endregion
    #region Public methods
    public void StartPumpingFrames()
    _pauseFramesEvent = new ManualResetEvent(true);
    _cameraCaptureEvent = new ManualResetEvent(true);
    _cameraInitializedEvent = new ManualResetEvent(false);
    InitializeCamera();
    _pumpFrames = true;
    if (_pumpFramesThread == null)
    _pumpFramesThread = new Thread(PumpFrames);
    if (!_pumpFramesThread.IsAlive)
    _pumpFramesThread.Start();
    public void StopPumpingFrames()
    _pumpFrames = false;
    _pumpFramesThread = null;
    Camera.Dispose();
    public void TakePhoto()
    if (TakingPhoto)
    return;
    _cameraCaptureEvent.Reset();
    FrameworkDispatcher.Update();
    _cameraShutterSound.Play();
    _takingPhoto = true;
    Camera.CaptureImage();
    #endregion
    private void CameraButtonsOnShutterKeyPressed(object sender, EventArgs eventArgs)
    if (_photoOnPress && !TakingPhoto)
    _cameraCaptureEvent.WaitOne();
    TakePhoto();
    private void OnUnloaded(object sender, RoutedEventArgs e)
    _cameraInitializedEvent.Reset();
    public void InitializeCamera()
    _cameraInitializedEvent.Reset();
    // Check to see if the camera is available on the device.
    if ((PhotoCamera.IsCameraTypeSupported(CameraType.Primary) == true) ||
    (PhotoCamera.IsCameraTypeSupported(CameraType.FrontFacing) == true))
    // Initialize the default camera.
    _camera = new Microsoft.Devices.PhotoCamera();
    //Event is fired when the PhotoCamera object has been initialized
    Camera.Initialized +=
    new EventHandler<Microsoft.Devices.CameraOperationCompletedEventArgs>(CameraInitialized);
    Camera.CaptureImageAvailable += CameraOnCaptureImageAvailable;
    Camera.CaptureCompleted += CameraOnCaptureCompleted;
    //Set the VideoBrush source to the camera
    // var viewfinderBrush = new VideoBrush();
    viewfinderBrush = new VideoBrush();
    viewfinderBrush.Stretch = Stretch.Fill;
    viewfinderBrush.RelativeTransform = new CompositeTransform { CenterX = 0.5, CenterY = 0.5 };
    viewfinderBrush.SetSource(Camera);
    System.Windows.Shapes.Rectangle rect = new System.Windows.Shapes.Rectangle();
    rect.Fill = viewfinderBrush;
    this.Children.Add(rect);
    Stream stream = TitleContainer.OpenStream("models/shutter.wav");
    _cameraShutterSound = SoundEffect.FromStream(stream);
    // CameraButtons.ShutterKeyPressed -= CameraButtonsOnShutterKeyPressed;
    if (_photoOnPress)
    // CameraButtons.ShutterKeyPressed += CameraButtonsOnShutterKeyPressed;
    else
    // The camera is not supported on the device.
    MessageBox.Show(
    "Sorry, this sample requires a phone camera and no camera is detected. This application will not show any camera output.");
    private void CameraOnCaptureCompleted(object sender, CameraOperationCompletedEventArgs cameraOperationCompletedEventArgs)
    _cameraCaptureEvent.Set();
    _takingPhoto = false;
    private void CameraOnCaptureImageAvailable(object sender, ContentReadyEventArgs contentReadyEventArgs)
    if (SaveToCameraRoll)
    Dispatcher.BeginInvoke(() =>
    WriteableBitmap bitmap =
    CreateWriteableBitmap(contentReadyEventArgs.ImageStream,
    (int)Camera.Resolution.Width,
    (int)Camera.Resolution.Height);
    // SaveCapturedImage(bitmap);
    //TakeScreenShots();
    if (NewCameraCaptureImage != null)
    NewCameraCaptureImage.Invoke(this, contentReadyEventArgs);
    // Helper for CameraOnCaptureImageAvailable
    private void SaveCapturedImage(WriteableBitmap imageToSave)
    var stream = new MemoryStream();
    imageToSave.SaveJpeg(stream, imageToSave.PixelWidth, imageToSave.PixelHeight, 0, 100);
    //Take the stream back to its beginning because it will be read again
    //when saving to the library
    stream.Position = 0;
    var library = new MediaLibrary();
    string fileName = string.Format("{0:yyyy-MM-dd-HH-mm-ss}.jpg", DateTime.Now);
    library.SavePictureToCameraRoll(fileName, stream);
    //save to Save Photo
    Picture pic;
    private void TakeScreenShots()
    WriteableBitmap bmp = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight);
    bmp.Render(this, null);
    byte[] bb = EncodeToJpeg(bmp);
    bmp.Invalidate();
    MemoryStream mem = new MemoryStream();
    bmp.SaveJpeg(mem, bmp.PixelWidth, bmp.PixelHeight, 0, 100);
    mem.Seek(0, System.IO.SeekOrigin.Begin);
    if (mem != null)
    MediaLibrary library = new MediaLibrary();
    try
    pic = library.SavePicture("Mask_" + Guid.NewGuid().ToString(), mem);
    MessageBox.Show("Your picture is now accessible through the Saved Picture album.", "Saved successfully.", MessageBoxButton.OK);
    catch (Exception ex)
    MessageBox.Show("Unable to save the photo." + ex);
    public byte[] EncodeToJpeg(WriteableBitmap wb)
    using (MemoryStream stream = new MemoryStream())
    wb.SaveJpeg(
    stream,
    wb.PixelWidth,
    wb.PixelHeight,
    0,
    85);
    return stream.ToArray();
    // Creates a WriteableBitmap from an imageStream
    private WriteableBitmap CreateWriteableBitmap(Stream imageStream, int width, int height)
    var bitmap = new WriteableBitmap(width, height);
    imageStream.Position = 0;
    bitmap.LoadJpeg(imageStream);
    return bitmap;
    private void CameraInitialized(object sender, CameraOperationCompletedEventArgs e)
    if (e.Succeeded)
    try
    // available resolutions are ordered based on number of pixels in each resolution
    CameraWidth = (int)Camera.PreviewResolution.Width;
    CameraHeight = (int)Camera.PreviewResolution.Height;
    if (CamInitialized != null)
    CamInitialized.Invoke(this, e);
    _cameraInitializedEvent.Set();
    _pauseFramesEvent.Set();
    catch (ObjectDisposedException)
    // If the camera was disposed, try initializing again
    private void PumpFrames()
    _cameraInitializedEvent.WaitOne();
    int[] pixels = new int[CameraWidth * CameraHeight];
    int numExceptions = 0;
    while (_pumpFrames)
    _pauseFramesEvent.WaitOne();
    _cameraCaptureEvent.WaitOne();
    _cameraInitializedEvent.WaitOne();
    try
    Camera.GetPreviewBufferArgb32(pixels);
    catch (Exception e)
    // If we get an exception try capturing again, do this up to 10 times
    if (numExceptions >= 10)
    throw e;
    numExceptions++;
    continue;
    numExceptions = 0;
    _pauseFramesEvent.Reset();
    Deployment.Current.Dispatcher.BeginInvoke(
    () =>
    if (NewCameraFrame != null && _pumpFrames)
    NewCameraFrame(this, new CameraFrameEventArgs { ARGBData = pixels });
    _pauseFramesEvent.Set();
    //na zmenu orientacie
    public void UpdateOrientation(PageOrientation orientation)
    if (orientation == PageOrientation.PortraitDown)
    viewfinderBrush.RelativeTransform =
    new CompositeTransform { CenterX = 0.5, CenterY = 0.5, Rotation = 270 };
    /* else if (orientation == PageOrientation.PortraitDown && cameraType == 2)
    viewfinderBrush.RelativeTransform =
    new CompositeTransform { CenterX = 0.5, CenterY = 0.5, Rotation = 90 };
    else if (orientation == PageOrientation.PortraitUp && cameraType == 2)
    viewfinderBrush.RelativeTransform =
    new CompositeTransform { CenterX = 0.5, CenterY = 0.5, Rotation = -90 };
    else if (orientation == PageOrientation.PortraitUp)
    viewfinderBrush.RelativeTransform =
    new CompositeTransform { CenterX = 0.5, CenterY = 0.5, Rotation =90 };
    else if (orientation == PageOrientation.LandscapeLeft)
    viewfinderBrush.RelativeTransform =
    new CompositeTransform { CenterX = 0.5, CenterY = 0.5, Rotation = 0 };
    else if (orientation == PageOrientation.LandscapeRight)
    viewfinderBrush.RelativeTransform =
    new CompositeTransform { CenterX = 0.5, CenterY = 0.5, Rotation = -180 };
    Thanks for reply.

    Hi Facko,
    Thanks for posting at the forum, however it could be really difficult for us to copy/paste your code and try to repro the issue, I would suggest you to provide a repro sample for us so that we can debug for you.
    And base on your description, looks like your app only crashes on the real device, but not on the emulator. I have question here, how the app works on the emulator?
    As I know if we open the camera on emulator, the only thing we can see is kind of small color blocks instead of the real images.
    You could also try to close the camera and then dispose the object to see if it works.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Orange Screen when switching

    Hello, I recently bought a 15" mac book pro and partitioned the hard drive and installed 64 bit windows 7 on it, recently when switching from OSX to windows 7 using boot camp a orange screen with a white line will display and the computer is locked up. When turned off and turned back on windows 7 usually starts normally. I hadn't seen a similar topic on a similar problem and was wondering if I should be concerned.

    I know exactly what you mean regarding Orange, ever since they were taken over by France Telecom they have been going downhill.
    I ported away all of my Orange contract and PAYG numbers a few months back to o2 and Tesco myself.
    I find the Orange branding on my old unlocked 6230 that I gave my mother serves as a reminder that they will never get a penny from me again. The branding does not affect any functionality as far as I can tell on Tesco.
    I did have bluetooth issues with mine, so I had it updated at a Nokia service centre to 5.50 which cured most of the problems. If your handset is out of warranty they can charge anything up to around £20 for the firmware to be updated and depending on how you had it unlocked it could come back relocked to Orange, you could also have a word to see if anything can be done about the Orange branding if it still irritates you while you are there.
    First use the search to see if your question has already been answered...
    Secondly I will not knowingly assist in breaking the forum rules.
    My information is always changing, what I post at the time is usually true.

  • How do I resize my screen? I cant see the control f menu or the bottom of web pages unless I "restore down" to a smaller window size.

    I cant see the control f menu or the bottom of web pages unless I "restore down" to a smaller window size.

    The problem is when you maximize the window -- it is even bigger than the area available? Or the problem is that normal windows are always too large and have to be resized manually?

  • Will only remember certain window sizes

    Firefox 31 will only remember certain window sizes, only the page when the browser is first opened. Every page after that has to be enlarged. This always seems to be a problem with Firefox, why can't I have it remember my default window size?
    Running Windows 8.1 Pro 64

    I use Freemake Video Converter and this gives an option to deliver straight to I-Tunes. Vids appears under Films . So far for some reason I have managed to download lots of stuff from YouTube witout issue with the exception on 1 video from the band Within Temptation, however, a further 10 have downloaded perfectly from the same band. Can only assume there may be a corruption somewhere, although it was an Official Video by Vevo.

  • Window size question

    Is it just me or does itunes 11.0.5 not remember window size after being minimized when restored?
    I run itunes minimized continually so I can access it on my home network but noticed after upgrading to the latest version 11.0.5 that when you restore it, it comes up in a smaller size and each time you have to maximize or resize it to what you want. Never used to be like that. Or am I missing some setting that got restored to a default during the upgrade?

    Here, because maybe you need pictures to comprehend:
    1. Maximized to full screen
    2. Minimized:
    3. Restored:
    And it does that every time. And on every computer I own btw.

  • Im having trouble connecting my macbookpro to the tv. im using a mini display port to hdmi adapter, when i switch tv/video to hdmi on the tv nothing pops up, and i dont have the arrangement tap on the display settings, please help!

    im having trouble connecting my macbookpro to the tv. im using a mini display port to hdmi adapter, when i switch tv/video to hdmi on the tv nothing pops up, and i dont have the arrangement tap on the display settings, please help!

    I've found that the order of operations, so-to-speak, can be important when hooking up mini display port to HDMI.  I have the most success with the following operations in this order:
    1)  Plug HDMI cable into mini displayport adapter (the cable should not be plugged into either the TV or the computer at this point)
    2)  Plug the mini displayport end of your new super-cable to the computer.
    3)  Plug the HDMI end into your TV.
    4)  Switch inputs on your TV to the proper input.
    5)  If still nothing on the TV, try a different HDMI port on your TV.
    Hopefully this helps!  Good luck.

  • HT3382 I have a Samsung VGA Monitor connected to my MacBook Pro using the Mini Display Port to VGA Adapter.  How do I configure the computer so that it doesn't sleep when I close the lid of the computer.

    I have a Samsung VGA Monitor connected to my MacBook Pro using the Mini Display Port to VGA Adapter.  How do I configure the computer so that it doesn't sleep when I close the lid of the computer.

    Hi alangium,
    Welcome to the Support Communities!
    Resetting your computer's PRAM should restore your Macbook Pro's screen appearance.
    OS X Mavericks: Reset your computer’s PRAM
    http://support.apple.com/kb/ph14222
    This article may provide some information about your Mini DisplayPort to AVI adapter.  Have you tried to connect a different VGA monitor to your Macbook to see if you get the same results?
    Apple Mini DisplayPort adapters: Frequently asked questions (FAQ)
    http://support.apple.com/kb/HT3382
    18. What is the maximum resolution available for use with the Apple Mini DisplayPort to VGA adapter?
    The resolution available with the Apple Mini DisplayPort to VGA Adapter is 1920 x 1200. VGA displays that use higher refresh rates (such as 85 Hz) at resolutions of 1600 x 1200 or greater may not generate video properly until you lower the refresh rate.
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/HT1573#5
    How can I detect displays?
    If the detect displays option is not available, hold down the Option key while you are in the Display pane.
    How do I select additional resolutions on my display?
    You can use the Display pane of System Preferences to specify how your display works. Not all options appear for all display models. By default the best resolution for your display will already be selected in System Preferences.
    To select a different resolution, use the Scaled option. Some additional resolutions may be available when you hold the Option button.
    I hope this information helps ....
    - Judy

  • Version 33, problems when moving tab to new window, then if you open a new tab in that window it doesn't switch to it unless you use Ctrl-Tab?

    Version 33, problems when moving tab to new window, then if you open a new tab in that window it doesn't switch to it unless you use Ctrl-Tab.

    Type '''about:preferences'''<enter> in the address bar.
    Select '''General.''' Look for '''Tabs.'''
    Turn on '''When I open a link in a new tab, switch to it immediately'''

Maybe you are looking for

  • What is the best practice to export  schema from HTMLDB 2.0 to Bundle APEX

    Hello, 1. I want to transfer data ( with trigger, sequence, procedures and functions ) from schema in HTMLDB 2.0 to APEX (with internal www server). 2. Application export and import is good. I want to import data from this apps schema to Oracle XE in

  • Problem with the Value property node (MacOS)

    As far as I have tested it, Value Property nodes (and Value (signaling)) don't work in MacOS : The value property appears as a boolean, the value(signaling) as a cluster (width, height). Even with boolean controls, the node is not working. No such pr

  • DVI output no sound?

    just managed to conect my MBP to my 42" hd plasma via DVI-HDMI converter into the HDMI in on the back to the display. why am i not getting any sound? does the dvi only output video??? do i have to use some sort of audio line out to a non-existant aud

  • Runtime Dump

    hi Can this group help me with this error. I am unable to transact anything in SAP ECC . If i create an order, i get this dump or if do a F1 or F4 i get this dump What happened?     The current ABAP/4 program had to be terminated because the     ABAP

  • Displaying pictures in document presentation

    document without pictures are missing 'thousands of words', after all pictures are worth thousand words. so how do i display pictures in document when they are converted to HTML. the Oracle Text Application Developer's guide shows an image in a docum