LibreOffice Module vcl (master)  1
jpeg.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_H
21 #define INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_H
22 
23 #include <sal/config.h>
24 
25 #include <com/sun/star/uno/Reference.hxx>
27 #include <bitmapwriteaccess.hxx>
28 
29 #include <jpeglib.h>
30 
31 namespace com { namespace sun { namespace star { namespace task {
32  class XStatusIndicator;
33 } } } }
34 class JPEGReader;
35 class JPEGWriter;
36 class Size;
37 class SvStream;
38 enum class GraphicFilterImportFlags;
39 
40 void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile);
41 
42 void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile);
43 
44 bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
45  long nWidth, long nHeight, basegfx::B2DSize const & aPPI, bool bGreyScale,
46  long nQualityPercent, long aChromaSubsampling,
47  css::uno::Reference<css::task::XStatusIndicator> const & status);
48 
49 void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
50  Size const & previewSize, GraphicFilterImportFlags nImportFlags,
51  BitmapScopedWriteAccess* ppAccess );
52 
53 void Transform(void* pInputStream, void* pOutputStream, long nAngle);
54 
55 /* Expanded data source object for stdio input */
56 
58  jpeg_source_mgr pub; /* public fields */
59  SvStream* stream; /* source stream */
60  JOCTET* buffer; /* start of buffer */
61  boolean start_of_file; /* have we gotten any data yet? */
63 };
64 
65 #endif
66 
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
JOCTET * buffer
Definition: jpeg.h:60
bool WriteJPEG(JPEGWriter *pJPEGWriter, void *pOutputStream, long nWidth, long nHeight, basegfx::B2DSize const &aPPI, bool bGreyScale, long nQualityPercent, long aChromaSubsampling, css::uno::Reference< css::task::XStatusIndicator > const &status)
Definition: jpegc.cxx:358
This template handles BitmapAccess the RAII way.
boolean start_of_file
Definition: jpeg.h:61
void Transform(void *pInputStream, void *pOutputStream, long nAngle)
Definition: jpegc.cxx:444
void ReadJPEG(JPEGReader *pJPEGReader, void *pInputStream, long *pLines, Size const &previewSize, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess *ppAccess)
Definition: jpegc.cxx:350
void jpeg_svstream_dest(j_compress_ptr cinfo, void *outfile)
Definition: JpegWriter.cxx:88
void jpeg_svstream_src(j_decompress_ptr cinfo, void *infile)
Definition: JpegReader.cxx:139
SvStream * stream
Definition: jpeg.h:59
jpeg_source_mgr pub
Definition: jpeg.h:58
boolean no_data_available
Definition: jpeg.h:62
GraphicFilterImportFlags