~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/ipelets/image/image.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2005-02-24 22:09:16 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050224220916-9vxiiqjz066r5489
Tags: 6.0pre23-2
debian/control: Ipe should depend on exact version of libipe.
Closes: #296771.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <qclipboard.h>
38
38
#include <qapplication.h>
39
39
 
40
 
#include <zlib.h>
41
 
 
42
40
// --------------------------------------------------------------------
43
41
 
44
42
/*
278
276
    }
279
277
  }
280
278
 
281
 
  bool deflated = false;
282
 
  ulong deflatedSize = ulong(datalen * 1.001 + 13);
283
 
  IpeBuffer deflatedData(deflatedSize);
284
 
  if (compress2((Bytef *) deflatedData.data(), &deflatedSize,
285
 
                (const Bytef *) data.data(), data.size(), 9) == Z_OK) {
286
 
    data = IpeBuffer(deflatedData.data(), deflatedSize);
287
 
    deflated = true;
288
 
  }
289
279
  IpeBitmap bitmap(iWidth, iHeight, iColorSpace, 8, data,
290
 
                   deflated ? IpeBitmap::EFlateDecode :
291
 
                   IpeBitmap::EDirect);
 
280
                   IpeBitmap::EDirect, true);
292
281
  IpeImage *obj = new IpeImage(ComputeRect(helper), bitmap);
293
282
  page->push_back(IpePgObject(IpePgObject::ESecondary,
294
283
                              helper->CurrentLayer(), obj));