MCPcopy Create free account
hub / github.com/Kitware/VTK / EncodeAsBase64Jpg

Method EncodeAsBase64Jpg

Web/Core/vtkDataEncoder.cxx:304–315  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

302
303//------------------------------------------------------------------------------
304const char* vtkDataEncoder::EncodeAsBase64Jpg(vtkImageData* img, int quality)
305{
306 // Perform in-memory write of image as jpg
307 vtkNew<vtkJPEGWriter> writer;
308 writer->WriteToMemoryOn();
309 writer->SetInputData(img);
310 writer->SetQuality(quality);
311 writer->Write();
312
313 // Return Base64-encoded string
314 return this->Internals->GetBase64EncodedImage(writer->GetResult());
315}
316
317//------------------------------------------------------------------------------
318void vtkDataEncoder::Flush(vtkTypeUInt32 key)

Callers

nothing calls this directly

Calls 3

SetInputDataMethod · 0.45
WriteMethod · 0.45
GetResultMethod · 0.45

Tested by

no test coverage detected