Skip to content

Commit

Permalink
Fix #1606 sprite sheet contains full path of image
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuusweetfish committed Mar 22, 2019
1 parent 3ec3f75 commit ca1728f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/doc_exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,9 @@ void DocExporter::createDataFile(const Samples& samples, std::ostream& os, Image
<< " \"version\": \"" << VERSION << "\",\n";

if (!m_textureFilename.empty())
os << " \"image\": \"" << escape_for_json(m_textureFilename).c_str() << "\",\n";
os << " \"image\": \""
<< escape_for_json(base::get_file_name(m_textureFilename)).c_str()
<< "\",\n";

os << " \"format\": \"" << (textureImage->pixelFormat() == IMAGE_RGB ? "RGBA8888": "I8") << "\",\n"
<< " \"size\": { "
Expand Down

0 comments on commit ca1728f

Please sign in to comment.