SilentEye 0.4.1
Public Types | Public Member Functions | Private Member Functions | Private Attributes

SEFormatJPEG::ImageJPEG Class Reference

JPEG image representation. More...

#include <imagejpeg.h>

Inheritance diagram for SEFormatJPEG::ImageJPEG:
SilentEyeFramework::Image SilentEyeFramework::Image SilentEyeFramework::Media SilentEyeFramework::Media

List of all members.

Public Types

enum  HeaderPosition {
  TOP = 1, BOTTOM = 2, SIGNATURE = 3, TOP = 1,
  BOTTOM = 2, SIGNATURE = 3
}
enum  HeaderPosition {
  TOP = 1, BOTTOM = 2, SIGNATURE = 3, TOP = 1,
  BOTTOM = 2, SIGNATURE = 3
}

Public Member Functions

 ImageJPEG ()
 Create empty instance.
 ~ImageJPEG ()
 ImageJPEG (const QString &filePath)
 Create instance from file.
 ImageJPEG (const QPixmap &pixmap, QString filePath="Pixmap")
 Create instance from pixmap.
 ImageJPEG (const Image &image)
 Create instance by copy.
 ImageJPEG (Image *image)
 Create instance by reference.
void setK (int)
void setPassphrase (QString)
void setQuality (int)
void setHeaderPosition (HeaderPosition)
quint32 capacity () const
 JPEG image capacity (octets)
bool loadData ()
 load hidden information from current image
bool saveToDir (QString &)
 Hide information into image and save it to output dir.
 ImageJPEG ()
 ~ImageJPEG ()
 ImageJPEG (const QString &filePath)
 ImageJPEG (const QPixmap &pixmap, QString filePath="Pixmap")
 ImageJPEG (const Image &image)
 ImageJPEG (Image *image)
void setK (int)
void setPassphrase (QString)
void setQuality (int)
void setHeaderPosition (HeaderPosition)
quint32 capacity () const
bool loadData ()
bool hideData ()
bool saveToDir (QString &outputDirPath)

Private Member Functions

void init ()
int computeDistributionStep (quint32, int, int)
 Compute distribution step according to data size and image dimension.
QPoint * computeHeaderPosition (int, int)
 Compute header position (bottom/stop/signature)
bool isBetweenPoint (const QPoint &, const QPoint &, const QPoint &)
 Check point collision (used when header is signature)
QPoint computeNewPosition (const QPoint &, int, int width, int height, bool=false)
 Compute next position according to distribution step and block size.
void init ()
int computeDistributionStep (quint32 size, int width, int height)
QPoint * computeHeaderPosition (int width, int height)
bool isBetweenPoint (const QPoint &, const QPoint &, const QPoint &)
QPoint computeNewPosition (const QPoint &, int, int width, int height, bool=false)

Private Attributes

QPointer< Loggerm_logger
 logger
quint16 m_nbBits
 number of pixel to hide into one block
int m_k
 luminance interval (used for stegotables)
QString m_passphrase
 passphrase for random stegotable
int m_quality
 JPEG compression quality.
HeaderPosition m_headerPosition
 Header position (for data size)
int m_blockWidth
 Block width used for equi distribution.
int m_blockHeight
 Block height used for equi distribution.
int m_blockInnerPos
 Information's position into a block (equi distribution)

Detailed Description

JPEG image representation.

Definition at line 30 of file imagejpeg.h.


Member Enumeration Documentation

Enumerator:
TOP 

hide header at begenning of the image

BOTTOM 

hide header at the end of the image

SIGNATURE 

hide header at 95% of height and width

TOP 

hide header at begenning of the image

BOTTOM 

hide header at the end of the image

SIGNATURE 

hide header at 95% of height and width

Definition at line 33 of file imagejpeg.h.

Enumerator:
TOP 

hide header at begenning of the image

BOTTOM 

hide header at the end of the image

SIGNATURE 

hide header at 95% of height and width

TOP 

hide header at begenning of the image

BOTTOM 

hide header at the end of the image

SIGNATURE 

hide header at 95% of height and width

Definition at line 32 of file imagejpeg.h.


Constructor & Destructor Documentation

SEFormatJPEG::ImageJPEG::ImageJPEG ( )

Create empty instance.

SEFormatJPEG::ImageJPEG::~ImageJPEG ( )

Definition at line 57 of file imagejpeg.cpp.

SEFormatJPEG::ImageJPEG::ImageJPEG ( const QString &  filePath)

Create instance from file.

Definition at line 33 of file imagejpeg.cpp.

SEFormatJPEG::ImageJPEG::ImageJPEG ( const QPixmap &  pixmap,
QString  filePath = "Pixmap" 
)

Create instance from pixmap.

Definition at line 39 of file imagejpeg.cpp.

SEFormatJPEG::ImageJPEG::ImageJPEG ( const Image image)

Create instance by copy.

Definition at line 45 of file imagejpeg.cpp.

SEFormatJPEG::ImageJPEG::ImageJPEG ( Image image)

Create instance by reference.

Definition at line 51 of file imagejpeg.cpp.

SEFormatJPEG::ImageJPEG::ImageJPEG ( )
SEFormatJPEG::ImageJPEG::~ImageJPEG ( )
SEFormatJPEG::ImageJPEG::ImageJPEG ( const QString &  filePath)
SEFormatJPEG::ImageJPEG::ImageJPEG ( const QPixmap &  pixmap,
QString  filePath = "Pixmap" 
)
SEFormatJPEG::ImageJPEG::ImageJPEG ( const Image image)
SEFormatJPEG::ImageJPEG::ImageJPEG ( Image image)

Member Function Documentation

quint32 SEFormatJPEG::ImageJPEG::capacity ( ) const [virtual]

JPEG image capacity (octets)

Reimplemented from SilentEyeFramework::Media.

Definition at line 94 of file imagejpeg.cpp.

Referenced by saveToDir().

quint32 SEFormatJPEG::ImageJPEG::capacity ( ) const [virtual]

Reimplemented from SilentEyeFramework::Media.

int SEFormatJPEG::ImageJPEG::computeDistributionStep ( quint32  size,
int  width,
int  height 
) [private]

Compute distribution step according to data size and image dimension.

Parameters:
sizeData size
widthNumber of block in a row
heightNumber of block in a column

Definition at line 361 of file imagejpeg.cpp.

int SEFormatJPEG::ImageJPEG::computeDistributionStep ( quint32  size,
int  width,
int  height 
) [private]
QPoint * SEFormatJPEG::ImageJPEG::computeHeaderPosition ( int  width,
int  height 
) [private]

Compute header position (bottom/stop/signature)

Parameters:
widthNumber of block in a row
heightNumber of block in a column

Definition at line 427 of file imagejpeg.cpp.

QPoint* SEFormatJPEG::ImageJPEG::computeHeaderPosition ( int  width,
int  height 
) [private]
QPoint SEFormatJPEG::ImageJPEG::computeNewPosition ( const QPoint &  oldPos,
int  step,
int  width,
int  height,
bool  first = false 
) [private]

Compute next position according to distribution step and block size.

Parameters:
oldPosOld position
stepDistribution step value
widthNumber of block in a row
heightNumber of block in a column
firstCompute first position

Definition at line 478 of file imagejpeg.cpp.

QPoint SEFormatJPEG::ImageJPEG::computeNewPosition ( const QPoint &  ,
int  ,
int  width,
int  height,
bool  = false 
) [private]
bool SEFormatJPEG::ImageJPEG::hideData ( )
void SEFormatJPEG::ImageJPEG::init ( ) [private]

Definition at line 62 of file imagejpeg.cpp.

void SEFormatJPEG::ImageJPEG::init ( ) [private]
bool SEFormatJPEG::ImageJPEG::isBetweenPoint ( const QPoint &  ref,
const QPoint &  start,
const QPoint &  end 
) [private]

Check point collision (used when header is signature)

Parameters:
refReference point
startFirst point of segment
endEnd point of segment

Definition at line 464 of file imagejpeg.cpp.

bool SEFormatJPEG::ImageJPEG::isBetweenPoint ( const QPoint &  ,
const QPoint &  ,
const QPoint &   
) [private]
bool SEFormatJPEG::ImageJPEG::loadData ( ) [virtual]

load hidden information from current image

Reimplemented from SilentEyeFramework::Media.

Definition at line 101 of file imagejpeg.cpp.

bool SEFormatJPEG::ImageJPEG::loadData ( ) [virtual]

Reimplemented from SilentEyeFramework::Media.

bool SEFormatJPEG::ImageJPEG::saveToDir ( QString &  outputDirPath) [virtual]

Reimplemented from SilentEyeFramework::Media.

bool SEFormatJPEG::ImageJPEG::saveToDir ( QString &  outputDirPath) [virtual]

Hide information into image and save it to output dir.

Parameters:
outputDirPathOutput directory path for encoded image

Reimplemented from SilentEyeFramework::Media.

Definition at line 219 of file imagejpeg.cpp.

References capacity(), SilentEyeFramework::Media::m_data, and m_logger.

void SEFormatJPEG::ImageJPEG::setHeaderPosition ( HeaderPosition  )
void SEFormatJPEG::ImageJPEG::setHeaderPosition ( HeaderPosition  pos)

Definition at line 89 of file imagejpeg.cpp.

Referenced by SEFormatJPEG::SEFormatJpeg::updateImage().

void SEFormatJPEG::ImageJPEG::setK ( int  )
void SEFormatJPEG::ImageJPEG::setK ( int  k)

Definition at line 74 of file imagejpeg.cpp.

Referenced by SEFormatJPEG::SEFormatJpeg::updateImage().

void SEFormatJPEG::ImageJPEG::setPassphrase ( QString  )
void SEFormatJPEG::ImageJPEG::setPassphrase ( QString  pass)

Definition at line 79 of file imagejpeg.cpp.

Referenced by SEFormatJPEG::SEFormatJpeg::updateImage().

void SEFormatJPEG::ImageJPEG::setQuality ( int  quality)

Definition at line 84 of file imagejpeg.cpp.

Referenced by SEFormatJPEG::SEFormatJpeg::updateImage().

void SEFormatJPEG::ImageJPEG::setQuality ( int  )

Member Data Documentation

Block height used for equi distribution.

Definition at line 54 of file imagejpeg.h.

Information's position into a block (equi distribution)

Definition at line 56 of file imagejpeg.h.

Block width used for equi distribution.

Definition at line 52 of file imagejpeg.h.

Header position (for data size)

Definition at line 50 of file imagejpeg.h.

luminance interval (used for stegotables)

Definition at line 44 of file imagejpeg.h.

logger

Definition at line 39 of file imagejpeg.h.

Referenced by saveToDir().

number of pixel to hide into one block

Definition at line 42 of file imagejpeg.h.

passphrase for random stegotable

Definition at line 46 of file imagejpeg.h.

JPEG compression quality.

Reimplemented from SilentEyeFramework::Image.

Definition at line 48 of file imagejpeg.h.


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