"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Pdf/PDFWriter/JPEGImageParser.h" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

JPEGImageParser.h  (TeXmacs-1.99.4-src):JPEGImageParser.h  (TeXmacs-1.99.5-src)
skipping to change at line 27 skipping to change at line 27
*/ */
#pragma once #pragma once
#include "EStatusCode.h" #include "EStatusCode.h"
#include "IOBasicTypes.h" #include "IOBasicTypes.h"
struct JPEGImageInformation; struct JPEGImageInformation;
class IByteReaderWithPosition; class IByteReaderWithPosition;
struct TwoLevelStatus
{
PDFHummus::EStatusCode primary;
PDFHummus::EStatusCode secondary;
TwoLevelStatus(PDFHummus::EStatusCode inPrimary,
PDFHummus::EStatusCode inSecondary)
{
primary = inPrimary;
secondary = inSecondary;
}
bool eitherBad()
{
return primary != PDFHummus::eSuccess || secondary != PDFHummus::
eSuccess;
}
};
class JPEGImageParser class JPEGImageParser
{ {
public: public:
JPEGImageParser(void); JPEGImageParser(void);
~JPEGImageParser(void); ~JPEGImageParser(void);
PDFHummus::EStatusCode Parse(IByteReaderWithPosition* inImageStream,JPEGI mageInformation& outImageInformation); PDFHummus::EStatusCode Parse(IByteReaderWithPosition* inImageStream,JPEGI mageInformation& outImageInformation);
private: private:
IByteReaderWithPosition* mImageStream; IByteReaderWithPosition* mImageStream;
IOBasicTypes::Byte mReadBuffer[500]; IOBasicTypes::Byte mReadBuffer[500];
PDFHummus::EStatusCode ReadJPEGID(); PDFHummus::EStatusCode ReadJPEGID();
PDFHummus::EStatusCode ReadStreamToBuffer(unsigned long inAmountToRead); PDFHummus::EStatusCode ReadStreamToBuffer(unsigned long inAmountToRead);
TwoLevelStatus ReadStreamToBuffer(unsigned long inAmountToRead, unsigned long& refReadLimit);
PDFHummus::EStatusCode ReadJpegTag(unsigned int& outTagID); PDFHummus::EStatusCode ReadJpegTag(unsigned int& outTagID);
PDFHummus::EStatusCode ReadSOF0Data(JPEGImageInformation& outImageInforma tion); PDFHummus::EStatusCode ReadSOF0Data(JPEGImageInformation& outImageInforma tion);
unsigned int GetIntValue(const IOBasicTypes::Byte* inBuffer, unsigned int GetIntValue(const IOBasicTypes::Byte* inBuffer,
bool inUseLittleEndian = false); bool inUseLittleEndian = false);
void SkipStream(unsigned long inSkip); void SkipStream(unsigned long inSkip);
PDFHummus::EStatusCode SkipStream(unsigned long inSkip, unsigned long& re fReadLimit);
PDFHummus::EStatusCode ReadJFIFData(JPEGImageInformation& outImageInforma tion); PDFHummus::EStatusCode ReadJFIFData(JPEGImageInformation& outImageInforma tion);
PDFHummus::EStatusCode ReadPhotoshopData(JPEGImageInformation& outImageIn formation,bool outPhotoshopDataOK); PDFHummus::EStatusCode ReadPhotoshopData(JPEGImageInformation& outImageIn formation,bool outPhotoshopDataOK);
PDFHummus::EStatusCode ReadExifData(JPEGImageInformation& outImageInforma tion); PDFHummus::EStatusCode ReadExifData(JPEGImageInformation& outImageInforma tion);
PDFHummus::EStatusCode GetResolutionFromExif( JPEGImageInformation& out ImageInformation, PDFHummus::EStatusCode GetResolutionFromExif( JPEGImageInformation& out ImageInformation,
unsign ed long inXResolutionOffset, unsign ed long inXResolutionOffset,
unsign ed long inYResolutionOffset, unsign ed long inYResolutionOffset,
unsign ed long& inoutOffset, unsign ed long& inoutOffset,
bool i nUseLittleEndian); bool i nUseLittleEndian);
PDFHummus::EStatusCode ReadRationalValue(double& outDoubleValue, PDFHummus::EStatusCode ReadRationalValue(double& outDoubleValue,
bool inUseLittl eEndian); bool inUseLittl eEndian);
PDFHummus::EStatusCode ReadExifID(); PDFHummus::EStatusCode ReadExifID();
PDFHummus::EStatusCode IsBigEndianExif(bool& outIsBigEndian); PDFHummus::EStatusCode IsBigEndianExif(bool& outIsBigEndian);
PDFHummus::EStatusCode ReadIntValue( unsigned int& outIntValue, PDFHummus::EStatusCode ReadIntValue( unsigned int& outIntValue,
bool inUseLittleE ndian = false); bool inUseLittleE ndian = false);
PDFHummus::EStatusCode SkipTillChar(IOBasicTypes::Byte inSkipUntilValue,u nsigned long& refSkipLimit); PDFHummus::EStatusCode SkipTillChar(IOBasicTypes::Byte inSkipUntilValue,u nsigned long& refSkipLimit);
PDFHummus::EStatusCode ReadLongValue( unsigned long& outLongValue, PDFHummus::EStatusCode ReadLongValue(unsigned long& outLongValue,
bool inUseLittleE bool inUseLittleEndian);
ndian = false); TwoLevelStatus ReadLongValue(
unsigned long& refReadLimit,
unsigned long& outLongValue,
bool inUseLittleEndian = false);
unsigned long GetLongValue( const IOBasicTypes::Byte* inBuffer, unsigned long GetLongValue( const IOBasicTypes::Byte* inBuffer,
bool inUseLittleE ndian); bool inUseLittleE ndian);
double GetFractValue(const IOBasicTypes::Byte* inBuffer); double GetFractValue(const IOBasicTypes::Byte* inBuffer);
PDFHummus::EStatusCode SkipTag(); PDFHummus::EStatusCode SkipTag();
}; };
 End of changes. 4 change blocks. 
3 lines changed or deleted 28 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS