VRay SDK for C++
Loading...
Searching...
No Matches
VRay::LocalJpeg Class Reference

A wrapper around JPEG data in memory. It's meant to be stack allocated to free the data when done. More...

#include <vraysdk.hpp>

Inheritance diagram for VRay::LocalJpeg:
VRay::CompressImage

Public Member Functions

 LocalJpeg (const VRayImage *img, const VRayRenderer &renderer, int quality=0)
 Same as the other constructor. The renderer is used to log error messages.
 
 LocalJpeg (const VRayImage *img, int quality=0)
 
 LocalJpeg (LocalJpeg &&other) noexcept
 
- Public Member Functions inherited from VRay::CompressImage
void * getBuf () const noexcept
 Returns a pointer to the image data.
 
size_t getLen () const noexcept
 Returns size of image data in bytes.
 
 operator size_t () const noexcept
 
bool saveToFile (const char *fileName) const
 Write the data to disk.
 
bool saveToFile (const std::string &fileName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void swap (CompressImage &ci) noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from VRay::CompressImage
 CompressImage (CompressImage &&ci) noexcept
 
- Protected Attributes inherited from VRay::CompressImage
void * bufAddr
 
size_t bufSize
 

Detailed Description

A wrapper around JPEG data in memory. It's meant to be stack allocated to free the data when done.

Constructor & Destructor Documentation

◆ LocalJpeg()

VRay::LocalJpeg::LocalJpeg ( const VRayImage *  img,
int  quality = 0 
)
inline

Compression is performed in this constructor

Parameters
imgThe source image to compress. The source is not modified.
qualityIf negative, abs(quality) is used and progressive encoding is performed

The documentation for this class was generated from the following file: