Index: /trunk/doc/manual/en_US/SDKRef.xml
===================================================================
--- /trunk/doc/manual/en_US/SDKRef.xml	(revision 55853)
+++ /trunk/doc/manual/en_US/SDKRef.xml	(revision 55854)
@@ -4194,4 +4194,20 @@
           <computeroutput>bitmapFormat</computeroutput>. As a consequence of this,
           IMachine::ReadSavedThumbnailPNGToArray() has been removed.
+        </para></listitem>
+
+        <listitem><para>
+          IMachine::QuerySavedScreenshotPNGSize() has been renamed to
+          IMachine::QuerySavedScreenshotInfo() which also returns
+          an array of available screenshot formats.
+        </para></listitem>
+
+        <listitem><para>
+          IMachine::ReadSavedScreenshotPNGToArray() has been renamed to
+          IMachine::ReadSavedScreenshotToArray() which  has a new parameter
+          <computeroutput>bitmapFormat</computeroutput>.
+        </para></listitem>
+
+        <listitem><para>
+          IMachine::QuerySavedThumbnailSize() has been removed.
         </para></listitem>
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp	(revision 55853)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp	(revision 55854)
@@ -76,5 +76,5 @@
     QVector <BYTE> thumbData = machine.ReadSavedThumbnailToArray (0, KBitmapFormat_BGR0, width, height);
     mThumbnail = thumbData.size() != 0 ? QPixmap::fromImage (QImage (thumbData.data(), width, height, QImage::Format_RGB32).copy()) : QPixmap();
-    QVector <BYTE> screenData = machine.ReadSavedScreenshotPNGToArray (0, width, height);
+    QVector <BYTE> screenData = machine.ReadSavedScreenshotToArray (0, KBitmapFormat_PNG, width, height);
     mScreenshot = screenData.size() != 0 ? QPixmap::fromImage (QImage::fromData (screenData.data(), screenData.size(), "PNG")) : QPixmap();
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 55853)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 55854)
@@ -647,7 +647,7 @@
         /* If there is a preview image saved,
          * we will resize the framebuffer to the size of that image: */
-        ULONG uBuffer = 0, uWidth = 0, uHeight = 0;
-        machine().QuerySavedScreenshotPNGSize(0, uBuffer, uWidth, uHeight);
-        if (uBuffer > 0)
+        ULONG uWidth = 0, uHeight = 0;
+        QVector<KBitmapFormat> formats = machine().QuerySavedScreenshotInfo(0, uWidth, uHeight);
+        if (formats.size() > 0)
         {
             /* Init with the screenshot size: */
@@ -1030,5 +1030,5 @@
     /* Acquire the screen-data from the saved-state: */
     ULONG uWidth = 0, uHeight = 0;
-    const QVector<BYTE> screenData = machine().ReadSavedScreenshotPNGToArray(0, uWidth, uHeight);
+    const QVector<BYTE> screenData = machine().ReadSavedScreenshotToArray(0, KBitmapFormat_PNG, uWidth, uHeight);
 
     /* Make sure there is saved-state screen-data: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp	(revision 55853)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp	(revision 55854)
@@ -207,5 +207,5 @@
                     /* Use the screenshot from saved-state if possible: */
                     ULONG uGuestWidth = 0, uGuestHeight = 0;
-                    QVector<BYTE> screenData = m_machine.ReadSavedScreenshotPNGToArray(0, uGuestWidth, uGuestHeight);
+                    QVector<BYTE> screenData = m_machine.ReadSavedScreenshotToArray(0, KBitmapFormat_PNG, uGuestWidth, uGuestHeight);
 
                     /* Make sure screen-data is OK: */
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 55853)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 55854)
@@ -4170,5 +4170,5 @@
   <interface
     name="IMachine" extends="$unknown"
-    uuid="77a44043-a68a-4ef9-ac26-e9567b1e6bbc"
+    uuid="feb138aa-dbce-4a89-8ec0-380fc7ec4913"
     wsmap="managed"
     wrap-hint-server-addinterfaces="IInternalMachineControl"
@@ -7037,33 +7037,64 @@
     </method>
 
-    <method name="querySavedThumbnailSize">
-      <desc>
-        Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
+    <method name="readSavedThumbnailToArray">
+      <desc>
+        Thumbnail is retrieved to an array of bytes in the requested format.
       </desc>
       <param name="screenId" type="unsigned long" dir="in">
         <desc>
+          Saved guest screen to read from.
+        </desc>
+      </param>
+      <param name="bitmapFormat" type="BitmapFormat" dir="in">
+        <desc>
+          The requested format.
+        </desc>
+      </param>
+      <param name="width" type="unsigned long" dir="out">
+        <desc>
+          Bitmap width.
+        </desc>
+      </param>
+      <param name="height" type="unsigned long" dir="out">
+        <desc>
+          Bitmap height.
+        </desc>
+      </param>
+      <param name="data" type="octet" safearray="yes" dir="return">
+        <desc>
+          Array with resulting bitmap data.
+        </desc>
+      </param>
+    </method>
+
+    <method name="querySavedScreenshotInfo">
+      <desc>
+        Returns available formats and size of the screenshot from saved state.
+      </desc>
+      <param name="screenId" type="unsigned long" dir="in">
+        <desc>
           Saved guest screen to query info from.
         </desc>
       </param>
-      <param name="size" type="unsigned long" dir="out">
-        <desc>
-          Size of buffer required to store the bitmap.
-        </desc>
-      </param>
       <param name="width" type="unsigned long" dir="out">
         <desc>
-          Bitmap width.
+          Image width.
         </desc>
       </param>
       <param name="height" type="unsigned long" dir="out">
         <desc>
-          Bitmap height.
-        </desc>
-      </param>
-    </method>
-
-    <method name="readSavedThumbnailToArray">
-      <desc>
-        Thumbnail is retrieved to an array of bytes in the requested format.
+          Image height.
+        </desc>
+      </param>
+      <param name="bitmapFormats" type="BitmapFormat" safearray="yes" dir="return">
+        <desc>
+          Formats supported by readSavedScreenshotToArray.
+        </desc>
+      </param>
+    </method>
+
+    <method name="readSavedScreenshotToArray">
+      <desc>
+        Screenshot in requested format is retrieved to an array of bytes.
       </desc>
       <param name="screenId" type="unsigned long" dir="in">
@@ -7079,67 +7110,15 @@
       <param name="width" type="unsigned long" dir="out">
         <desc>
-          Bitmap width.
+          Image width.
         </desc>
       </param>
       <param name="height" type="unsigned long" dir="out">
         <desc>
-          Bitmap height.
-        </desc>
-      </param>
-      <param name="data" type="octet" safearray="yes" dir="return">
-        <desc>
-          Array with resulting bitmap data.
-        </desc>
-      </param>
-    </method>
-
-    <method name="querySavedScreenshotPNGSize">
-      <desc>
-        Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
-      </desc>
-      <param name="screenId" type="unsigned long" dir="in">
-        <desc>
-          Saved guest screen to query info from.
-        </desc>
-      </param>
-      <param name="size" type="unsigned long" dir="out">
-        <desc>
-          Size of buffer required to store the PNG binary data.
-        </desc>
-      </param>
-      <param name="width" type="unsigned long" dir="out">
-        <desc>
-          Image width.
-        </desc>
-      </param>
-      <param name="height" type="unsigned long" dir="out">
-        <desc>
           Image height.
         </desc>
       </param>
-    </method>
-
-    <method name="readSavedScreenshotPNGToArray">
-      <desc>
-        Screenshot in PNG format is retrieved to an array of bytes.
-      </desc>
-      <param name="screenId" type="unsigned long" dir="in">
-        <desc>
-          Saved guest screen to read from.
-        </desc>
-      </param>
-      <param name="width" type="unsigned long" dir="out">
-        <desc>
-          Image width.
-        </desc>
-      </param>
-      <param name="height" type="unsigned long" dir="out">
-        <desc>
-          Image height.
-        </desc>
-      </param>
       <param name="data" type="octet" dir="return" safearray="yes">
         <desc>
-          Array with resulting PNG data.
+          Array with resulting image data.
         </desc>
       </param>
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 55853)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 55854)
@@ -1157,8 +1157,4 @@
                                       ULONG *aHeight,
                                       BOOL *aEnabled);
-    HRESULT querySavedThumbnailSize(ULONG aScreenId,
-                                    ULONG *aSize,
-                                    ULONG *aWidth,
-                                    ULONG *aHeight);
     HRESULT readSavedThumbnailToArray(ULONG aScreenId,
                                       BitmapFormat_T aBitmapFormat,
@@ -1166,12 +1162,14 @@
                                       ULONG *aHeight,
                                       std::vector<BYTE> &aData);
-    HRESULT querySavedScreenshotPNGSize(ULONG aScreenId,
-                                        ULONG *aSize,
-                                        ULONG *aWidth,
-                                        ULONG *aHeight);
-    HRESULT readSavedScreenshotPNGToArray(ULONG aScreenId,
-                                          ULONG *aWidth,
-                                          ULONG *aHeight,
-                                          std::vector<BYTE> &aData);
+    HRESULT querySavedScreenshotInfo(ULONG aScreenId,
+                                     ULONG *aWidth,
+                                     ULONG *aHeight,
+                                     std::vector<BitmapFormat_T> &aBitmapFormats);
+    HRESULT readSavedScreenshotToArray(ULONG aScreenId,
+                                       BitmapFormat_T aBitmapFormat,
+                                       ULONG *aWidth,
+                                       ULONG *aHeight,
+                                       std::vector<BYTE> &aData);
+
     HRESULT hotPlugCPU(ULONG aCpu);
     HRESULT hotUnplugCPU(ULONG aCpu);
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 55853)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 55854)
@@ -6370,32 +6370,4 @@
 }
 
-HRESULT Machine::querySavedThumbnailSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
-{
-    if (aScreenId != 0)
-        return E_NOTIMPL;
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    uint8_t *pu8Data = NULL;
-    uint32_t cbData = 0;
-    uint32_t u32Width = 0;
-    uint32_t u32Height = 0;
-
-    int vrc = readSavedDisplayScreenshot(mSSData->strStateFilePath, 0 /* u32Type */, &pu8Data, &cbData, &u32Width, &u32Height);
-
-    if (RT_FAILURE(vrc))
-        return setError(VBOX_E_IPRT_ERROR,
-                        tr("Saved screenshot data is not available (%Rrc)"),
-                        vrc);
-
-    *aSize = cbData;
-    *aWidth = u32Width;
-    *aHeight = u32Height;
-
-    freeSavedDisplayScreenshot(pu8Data);
-
-    return S_OK;
-}
-
 HRESULT Machine::readSavedThumbnailToArray(ULONG aScreenId, BitmapFormat_T aBitmapFormat,
                                            ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData)
@@ -6492,5 +6464,8 @@
 }
 
-HRESULT Machine::querySavedScreenshotPNGSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
+HRESULT Machine::querySavedScreenshotInfo(ULONG aScreenId,
+                                          ULONG *aWidth,
+                                          ULONG *aHeight,
+                                          std::vector<BitmapFormat_T> &aBitmapFormats)
 {
     if (aScreenId != 0)
@@ -6511,7 +6486,8 @@
                         vrc);
 
-    *aSize = cbData;
     *aWidth = u32Width;
     *aHeight = u32Height;
+    aBitmapFormats.resize(1);
+    aBitmapFormats[0] = BitmapFormat_PNG;
 
     freeSavedDisplayScreenshot(pu8Data);
@@ -6520,7 +6496,14 @@
 }
 
-HRESULT Machine::readSavedScreenshotPNGToArray(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData)
+HRESULT Machine::readSavedScreenshotToArray(ULONG aScreenId,
+                                            BitmapFormat_T aBitmapFormat,
+                                            ULONG *aWidth,
+                                            ULONG *aHeight,
+                                            std::vector<BYTE> &aData)
 {
     if (aScreenId != 0)
+        return E_NOTIMPL;
+
+    if (aBitmapFormat != BitmapFormat_PNG)
         return E_NOTIMPL;
 
