Ejemplo n.º 1
0
IntSize PDFDocumentImage::size() const
{
    IntSize expandedCropBoxSize = expandedIntSize(m_cropBox.size());

    if (m_rotationDegrees == 90 || m_rotationDegrees == 270)
        return expandedCropBoxSize.transposedSize();
    return expandedCropBoxSize;
}
Ejemplo n.º 2
0
IntSize ImageSource::frameSizeAtIndex(
    size_t index,
    RespectImageOrientationEnum shouldRespectOrientation) const {
  if (!m_decoder)
    return IntSize();

  IntSize size = m_decoder->frameSizeAtIndex(index);
  if ((shouldRespectOrientation == RespectImageOrientation) &&
      m_decoder->orientationAtIndex(index).usesWidthAsHeight())
    return size.transposedSize();

  return size;
}