1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <sal/config.h>
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <basegfx/vector/b2dsize.hxx>
26 #include <vcl/BitmapWriteAccess.hxx>
30 namespace com::sun::star::task
{
31 class XStatusIndicator
;
37 enum class GraphicFilterImportFlags
;
39 void jpeg_svstream_src (j_decompress_ptr cinfo
, void* infile
);
41 void jpeg_svstream_dest (j_compress_ptr cinfo
, void* outfile
);
43 bool WriteJPEG( JPEGWriter
* pJPEGWriter
, void* pOutputStream
,
44 tools::Long nWidth
, tools::Long nHeight
, basegfx::B2DSize
const & aPPI
, bool bGreyScale
,
45 tools::Long nQualityPercent
, tools::Long aChromaSubsampling
,
46 css::uno::Reference
<css::task::XStatusIndicator
> const & status
);
48 void ReadJPEG( JPEGReader
* pJPEGReader
, void* pInputStream
,
49 GraphicFilterImportFlags nImportFlags
,
50 BitmapScopedWriteAccess
* ppAccess
);
52 void Transform(void* pInputStream
, void* pOutputStream
, Degree10 nAngle
);
54 /* Expanded data source object for stdio input */
56 struct SourceManagerStruct
{
57 jpeg_source_mgr pub
; /* public fields */
58 SvStream
* stream
; /* source stream */
59 JOCTET
* buffer
; /* start of buffer */
60 boolean start_of_file
; /* have we gotten any data yet? */
61 int no_data_available_failures
;
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */