mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
Add colorspace and depth information in json for images
This commit is contained in:
parent
62ea3b9197
commit
86f9b4c43b
13
qpdf/qpdf.cc
13
qpdf/qpdf.cc
@ -293,6 +293,9 @@ static JSON json_schema(std::set<std::string>* keys = 0)
|
||||
JSON::makeString("reference to original page object"));
|
||||
JSON image = page.addDictionaryMember("images", JSON::makeArray()).
|
||||
addArrayElement(JSON::makeDictionary());
|
||||
image.addDictionaryMember(
|
||||
"name",
|
||||
JSON::makeString("name of image in XObject table"));
|
||||
image.addDictionaryMember(
|
||||
"object",
|
||||
JSON::makeString("reference to image stream"));
|
||||
@ -302,6 +305,12 @@ static JSON json_schema(std::set<std::string>* keys = 0)
|
||||
image.addDictionaryMember(
|
||||
"height",
|
||||
JSON::makeString("image height"));
|
||||
image.addDictionaryMember(
|
||||
"colorspace",
|
||||
JSON::makeString("color space"));
|
||||
image.addDictionaryMember(
|
||||
"bitspercomponent",
|
||||
JSON::makeString("bits per component"));
|
||||
image.addDictionaryMember("filter", JSON::makeArray()).
|
||||
addArrayElement(
|
||||
JSON::makeString("filters applied to image data"));
|
||||
@ -2695,6 +2704,10 @@ static void do_json_pages(QPDF& pdf, Options& o, JSON& j)
|
||||
"width", dict.getKey("/Width").getJSON());
|
||||
j_image.addDictionaryMember(
|
||||
"height", dict.getKey("/Height").getJSON());
|
||||
j_image.addDictionaryMember(
|
||||
"colorspace", dict.getKey("/ColorSpace").getJSON());
|
||||
j_image.addDictionaryMember(
|
||||
"bitspercomponent", dict.getKey("/BitsPerComponent").getJSON());
|
||||
QPDFObjectHandle filters = dict.getKey("/Filter").wrapInArray();
|
||||
j_image.addDictionaryMember(
|
||||
"filter", filters.getJSON());
|
||||
|
Loading…
Reference in New Issue
Block a user