| 133 | } |
| 134 | |
| 135 | AssetPath ImageMetadataDatabase::filterProcessing(AssetPath const& path) { |
| 136 | AssetPath newPath = { path.basePath, path.subPath, {} }; |
| 137 | |
| 138 | String filtered; |
| 139 | for (auto& directives : path.directives.list()) |
| 140 | directives.loadOperations(); |
| 141 | path.directives.forEach([&](auto const& entry, Directives const& directives) { |
| 142 | ImageOperation const& operation = entry.operation; |
| 143 | if (!(operation.is<HueShiftImageOperation>() || |
| 144 | operation.is<SaturationShiftImageOperation>() || |
| 145 | operation.is<BrightnessMultiplyImageOperation>() || |
| 146 | operation.is<FadeToColorImageOperation>() || |
| 147 | operation.is<ScanLinesImageOperation>() || |
| 148 | operation.is<SetColorImageOperation>())) { |
| 149 | filtered += "?"; |
| 150 | filtered += entry.string(*directives); |
| 151 | } |
| 152 | }); |
| 153 | |
| 154 | newPath.directives = std::move(filtered); |
| 155 | return newPath; |
| 156 | } |
| 157 | |
| 158 | Vec2U ImageMetadataDatabase::calculateImageSize(AssetPath const& path) const { |
| 159 | // Carefully calculate an image's size while trying not to actually load it. |
nothing calls this directly
no test coverage detected