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>
28
29#include <jpeglib.h>
30
31namespace com::sun::star::task {
32 class XStatusIndicator;
33}
34class JPEGReader;
35class JPEGWriter;
36class Size;
37class SvStream;
39
40void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile);
41
42void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile);
43
44bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
45 tools::Long nWidth, tools::Long nHeight, basegfx::B2DSize const & aPPI, bool bGreyScale,
46 tools::Long nQualityPercent, tools::Long aChromaSubsampling,
47 css::uno::Reference<css::task::XStatusIndicator> const & status);
48
49void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, tools::Long* pLines,
50 GraphicFilterImportFlags nImportFlags,
51 BitmapScopedWriteAccess* ppAccess );
52
53void Transform(void* pInputStream, void* pOutputStream, Degree10 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: */
This template handles BitmapAccess the RAII way.
GraphicFilterImportFlags
void ReadJPEG(JPEGReader *pJPEGReader, void *pInputStream, tools::Long *pLines, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess *ppAccess)
Definition: jpegc.cxx:333
bool WriteJPEG(JPEGWriter *pJPEGWriter, void *pOutputStream, tools::Long nWidth, tools::Long nHeight, basegfx::B2DSize const &aPPI, bool bGreyScale, tools::Long nQualityPercent, tools::Long aChromaSubsampling, css::uno::Reference< css::task::XStatusIndicator > const &status)
Definition: jpegc.cxx:341
void Transform(void *pInputStream, void *pOutputStream, Degree10 nAngle)
Definition: jpegc.cxx:434
void jpeg_svstream_dest(j_compress_ptr cinfo, void *outfile)
Definition: JpegWriter.cxx:92
void jpeg_svstream_src(j_decompress_ptr cinfo, void *infile)
Definition: JpegReader.cxx:139
long Long
SvStream * stream
Definition: jpeg.h:59
JOCTET * buffer
Definition: jpeg.h:60
int no_data_available_failures
Definition: jpeg.h:62
boolean start_of_file
Definition: jpeg.h:61
jpeg_source_mgr pub
Definition: jpeg.h:58