diff --git a/docs/index.html b/docs/index.html index 6117cd797..95dcd1730 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4033,18 +4033,28 @@

ROM Info Viewer

-

Stella supports viewing snapshots and ROM properties of the currently - selected ROM in the ROM launcher. Support is automatic, as long as your - image directory contains snapshots in the appropriate format. The title +

Stella supports viewing images and ROM properties of the currently + selected ROM in the ROM launcher. Image support is automatic, as long as your + image directory contains snapshots in the appropriate format. The label (if existing) and the number of matching snapshots are displayed under the - current one. The mouse or the launcher hotkeys can be used to browse the - snapshots. + current one. The mouse or the ROM Launcher hotkeys can be used to browse + multiple images or a ROM.

- An archive of + Notes: +
  • The images can have PNG or JPG format.
  • +
  • The image names must be identical to either Stella's ROM properties cart + name or the ROM's filename.
  • +
  • For displaying additional images per ROM, the image names must be + extended with '_#', where '#' is a number.
  • +
  • The image label is read from the image's metadata. For PNGs, the 'iTxt' + chunk, keyword 'Title', for JPGs, the EXIF field 'ImageDescription' is used. +
  • + +

    An archive of updated snapshots is available on the Stella webpage. This archive may be updated periodically as new ROMs are found, and also for each new release of Stella. In case no snapshot is found, you can - provide a default image named 'default_snapshot.png'. + provide a default image named 'default_snapshot.png' or 'default_snapshot.jpg'. Note that the snapshots can be any size (e.g. generated by Stella); they will be resized accordingly.

    diff --git a/src/common/JPGLibrary.cxx b/src/common/JPGLibrary.cxx index 192d97c70..c5cc3ace4 100644 --- a/src/common/JPGLibrary.cxx +++ b/src/common/JPGLibrary.cxx @@ -53,7 +53,6 @@ void JPGLibrary::loadImage(const string& filename, FBSurface& surface, myFileBuffer.resize(size); if(!in.read(myFileBuffer.data(), size)) loadImageERROR("Image data reading failed"); - in.close(); if(njDecode(myFileBuffer.data(), static_cast(size))) loadImageERROR("Error decoding the input file"); @@ -109,10 +108,10 @@ void JPGLibrary::readMetaData(const string& filename, VariantList& metaData) metaData.clear(); // open a stream to read just the necessary parts of the image file - std::ifstream istream(filename, std::ifstream::binary); + std::ifstream in(filename, std::ifstream::binary); // parse image EXIF metadata - TinyEXIF::EXIFInfo imageEXIF(istream); + TinyEXIF::EXIFInfo imageEXIF(in); if(imageEXIF.Fields) { // For now we only read the image description