Krita Source Code Documentation
Loading...
Searching...
No Matches
KisTIFFReaderFromPalette Class Reference

#include <kis_tiff_reader.h>

+ Inheritance diagram for KisTIFFReaderFromPalette:

Public Types

using type = uint16_t
 

Public Member Functions

uint32_t copyDataToChannels (quint32 x, quint32 y, quint32 dataWidth, QSharedPointer< KisBufferStreamBase > tiffstream) override
 
 KisTIFFReaderFromPalette (KisPaintDeviceSP device, uint16_t *red, uint16_t *green, uint16_t *blue, const std::array< quint8, 5 > &poses, int32_t alphapos, uint16_t sourceDepth, uint16_t sample_format, uint16_t nbcolorssamples, bool premultipliedAlpha, uint8_t extrasamplescount, KoColorTransformation *transformProfile, QSharedPointer< KisTIFFPostProcessor > postprocessor)
 
- Public Member Functions inherited from KisTIFFReaderBase
virtual void finalize ()
 
 KisTIFFReaderBase (KisPaintDeviceSP device, const std::array< quint8, 5 > &poses, int32_t alphapos, uint16_t sourceDepth, uint16_t sample_format, uint16_t nbcolorssamples, uint16_t extrasamplescount, bool premultipliedAlpha, KoColorTransformation *transformProfile, QSharedPointer< KisTIFFPostProcessor > postprocessor)
 
virtual ~KisTIFFReaderBase ()=default
 

Private Attributes

uint16_t * m_blue
 
uint16_t * m_green
 
uint16_t * m_red
 

Additional Inherited Members

- Protected Member Functions inherited from KisTIFFReaderBase
qint32 alphaPos () const
 
bool hasPremultipliedAlpha () const
 
quint16 nbColorsSamples () const
 
quint16 nbExtraSamples () const
 
KisPaintDeviceSP paintDevice () const
 
const std::array< quint8, 5 > & poses () const
 
const KisTIFFPostProcessorpostProcessor () const
 
uint16_t sampleFormat () const
 
quint16 sourceDepth () const
 
KoColorTransformationtransform () const
 

Detailed Description

Definition at line 454 of file kis_tiff_reader.h.

Member Typedef Documentation

◆ type

Definition at line 457 of file kis_tiff_reader.h.

Constructor & Destructor Documentation

◆ KisTIFFReaderFromPalette()

KisTIFFReaderFromPalette::KisTIFFReaderFromPalette ( KisPaintDeviceSP device,
uint16_t * red,
uint16_t * green,
uint16_t * blue,
const std::array< quint8, 5 > & poses,
int32_t alphapos,
uint16_t sourceDepth,
uint16_t sample_format,
uint16_t nbcolorssamples,
bool premultipliedAlpha,
uint8_t extrasamplescount,
KoColorTransformation * transformProfile,
QSharedPointer< KisTIFFPostProcessor > postprocessor )
inline

Definition at line 459 of file kis_tiff_reader.h.

472 : KisTIFFReaderBase(device,
473 poses,
474 alphapos,
476 sample_format,
477 nbcolorssamples,
478 extrasamplescount,
479 premultipliedAlpha,
480 transformProfile,
481 postprocessor)
482 , m_red(red)
483 , m_green(green)
484 , m_blue(blue)
485 {
486 }
const std::array< quint8, 5 > & poses() const
KisTIFFReaderBase(KisPaintDeviceSP device, const std::array< quint8, 5 > &poses, int32_t alphapos, uint16_t sourceDepth, uint16_t sample_format, uint16_t nbcolorssamples, uint16_t extrasamplescount, bool premultipliedAlpha, KoColorTransformation *transformProfile, QSharedPointer< KisTIFFPostProcessor > postprocessor)
quint16 sourceDepth() const

Member Function Documentation

◆ copyDataToChannels()

uint32_t KisTIFFReaderFromPalette::copyDataToChannels ( quint32 x,
quint32 y,
quint32 dataWidth,
QSharedPointer< KisBufferStreamBase > tiffstream )
inlineoverridevirtual

This function copy data from the tiff stream to the paint device starting at the given position.

Parameters
xhorizontal start position
yvertical start position
dataWidthwidth of the data to copy
tiffstreamsource of data
Returns
the number of line which were copied

Implements KisTIFFReaderBase.

Definition at line 489 of file kis_tiff_reader.h.

493 {
494 KisHLineIteratorSP it = paintDevice()->createHLineIteratorNG(static_cast<int>(x), static_cast<int>(y), static_cast<int>(dataWidth));
495 do {
497 reinterpret_cast<KisTIFFReaderFromPalette::type *>(
498 it->rawData());
499 uint32_t index = tiffstream->nextValue();
500 d[2] = m_red[index];
501 d[1] = m_green[index];
502 d[0] = m_blue[index];
503 d[3] = std::numeric_limits<KisTIFFReaderFromPalette::type>::max();
504
505 } while (it->nextPixel());
506 return 1;
507 }
KisHLineIteratorSP createHLineIteratorNG(qint32 x, qint32 y, qint32 w)
KisPaintDeviceSP paintDevice() const

References KisPaintDevice::createHLineIteratorNG(), m_blue, m_green, m_red, and KisTIFFReaderBase::paintDevice().

Member Data Documentation

◆ m_blue

uint16_t * KisTIFFReaderFromPalette::m_blue
private

Definition at line 510 of file kis_tiff_reader.h.

◆ m_green

uint16_t * KisTIFFReaderFromPalette::m_green
private

Definition at line 510 of file kis_tiff_reader.h.

◆ m_red

uint16_t* KisTIFFReaderFromPalette::m_red
private

Definition at line 510 of file kis_tiff_reader.h.


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