MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / removeLastChannel

Method removeLastChannel

tools/imageio/formatdesc.h:745–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743 }
744
745 void removeLastChannel() {
746 const auto numChannels = static_cast<uint32_t>(samples.size());
747 assert(numChannels > 1);
748 assert(basic.bytesPlane0 % numChannels == 0);
749 samples.pop_back();
750 basic.bytesPlane0 = basic.bytesPlane0 / numChannels * (numChannels - 1u);
751 if (extended.channelCount != 0)
752 --extended.channelCount;
753 }
754
755 friend std::ostream& operator<< (std::ostream& o, khr_df_sample_datatype_qualifiers_e q) {
756 if (q & KHR_DF_SAMPLE_DATATYPE_SIGNED)

Callers 1

unpackAndSave422Method · 0.80

Calls 3

assertFunction · 0.85
sizeMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected