mirror of https://github.com/stella-emu/stella.git
updated doc for multiple images format
This commit is contained in:
parent
730b66cc08
commit
f9a1782886
|
@ -4033,18 +4033,28 @@
|
|||
|
||||
<h3><b><a name="ROMInfoViewer">ROM Info Viewer</a></b></h3>
|
||||
|
||||
<p>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
|
||||
<p>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.</p>
|
||||
|
||||
An <a href="https://stella-emu.github.io/stella-snapshots.zip">archive</a> of
|
||||
Notes:
|
||||
<li>The images can have PNG or JPG format.</li>
|
||||
<li>The image names must be identical to either Stella's ROM properties cart
|
||||
name or the ROM's filename.</li>
|
||||
<li>For displaying additional images per ROM, the image names must be
|
||||
extended with '_#', where '#' is a number.</li>
|
||||
<li>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.
|
||||
</li>
|
||||
|
||||
<p>An <a href="https://stella-emu.github.io/stella-snapshots.zip">archive</a> 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.</p>
|
||||
|
||||
|
|
|
@ -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<int>(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
|
||||
|
|
Loading…
Reference in New Issue