Python에서 TIFF에 PPT PPT

TIFF은 PowerPoint 프레젠테이션을 이미지 형식으로 변환하는 데 사용되는 널리 사용되는 형식입니다. 이 변환은 PPT 슬라이드의 축소판을 생성하는 데 유용할 수 있습니다. 이 기사에서는 Python을 사용하여 PowerPoint PPT 또는 PPTX를 TIFF로 변환하는 방법을 배웁니다. 또한 다양한 옵션을 사용하여 PPT를 TIFF로 변환하는 방법을 배우게 됩니다.

TIFF 변환기에 PPT 파이썬 파워 포인트

Aspose.Slides for Python은 PowerPoint 프레젠테이션을 다양한 인기 있는 이미지 및 문서 형식으로 고화질로 변환합니다. 이 라이브러리를 사용하여 PPT/PPTX 프레젠테이션을 TIFF 형식으로 변환합니다. 다음 명령을 사용하여 PyPI에서 라이브러리를 설치할 수 있습니다.

> pip install aspose.slides

Python에서 PowerPoint PPTX를 TIFF로 변환

PowerPoint PPT/PPTX를 TIFF로 변환하는 작업은 아래와 같이 Python용 Aspose.Slides를 사용하여 몇 줄의 코드로 수행할 수 있습니다.

  • Presentation 클래스를 사용하여 PowerPoint PPT/PPTX를 로드합니다.
  • Presentation.save(string, SaveFormat.TIFF) 메서드를 사용하여 프레젠테이션을 TIFF로 저장합니다.

다음 코드 샘플은 Python에서 PowerPoint PPTX 파일을 TIFF로 변환하는 방법을 보여줍니다.

import aspose.slides as slides

# Load presentation
presentation = slides.Presentation("presentation.pptx")

# Save PPT as TIFF
presentation.save("ppt-to-tiff.tiff", slides.export.SaveFormat.TIFF)

Python에서 숨겨진 슬라이드를 사용하여 PPT를 TIFF로 변환

PowerPoint 프레젠테이션에는 기본적으로 PPT에서 TIFF로의 변환에 포함되지 않은 숨겨진 슬라이드가 포함되어 있는 경우가 많습니다. 그러나 아래와 같이 숨겨진 슬라이드의 렌더링을 활성화할 수 있습니다.

  • 먼저 Presentation 클래스를 사용하여 PowerPoint PPT/PPTX를 로드합니다.
  • 그런 다음 TiffOptions 클래스의 인스턴스를 만듭니다.
  • TiffOptions.show\hidden\slides 속성을 True로 설정합니다.
  • Presentation.save(string, SaveFormat.TIFF, TiffOptions) 메서드를 사용하여 프레젠테이션을 TIFF로 저장합니다.

다음 코드 샘플은 PPT에서 TIFF로의 변환에 숨겨진 슬라이드를 포함하는 방법을 보여줍니다.

import aspose.slides as slides

# Load presentation
presentation = slides.Presentation("presentation.pptx")

# Instantiate the TiffOptions class
opts = slides.export.TiffOptions()

# Set pixel format
opts.show_hidden_slides = True

# Save PPT as TIFF
presentation.save("ppt-to-tiff-hidden-slides.tiff", slides.export.SaveFormat.TIFF, opts)

PPT to TIFF - 압축 및 이미지 크기 사용자 지정

변환하는 동안 결과 TIFF 이미지의 크기를 사용자 정의할 수도 있습니다. 또한 변환된 TIFF 이미지의 기본 압축 유형을 변경할 수 있습니다. 다음 단계는 PowerPoint PPT에서 TIFF로 변환하는 압축 유형 및 이미지 크기를 설정하는 방법을 보여줍니다.

  • 먼저 Presentation 클래스를 사용하여 PowerPoint PPT/PPTX를 로드합니다.
  • 그런 다음 TiffOptions 클래스의 인스턴스를 만듭니다.
  • TiffOptions.image\size 속성을 사용하여 이미지 크기를 설정합니다.
  • TiffOptions.compression\type 속성을 사용하여 압축 유형을 설정합니다.
  • Presentation.save(string, SaveFormat.TIFF, TiffOptions) 메서드를 사용하여 PPT를 TIFF로 변환합니다.

다음 코드 샘플은 사용자 지정 이미지 크기 및 압축을 사용하여 PPTX를 TIFF로 변환하는 방법을 보여줍니다.

import aspose.slides as slides
import aspose.pydrawing as drawing

# Load presentation
presentation = slides.Presentation("presentation.pptx")

# Instantiate the TiffOptions class
opts = slides.export.TiffOptions()

# Set compression type
opts.compression_type = slides.export.TiffCompressionTypes.DEFAULT
opts.notes_comments_layouting.notes_position = slides.export.NotesPositions.BOTTOM_FULL

# Set image DPI
opts.dpi_x = 200
opts.dpi_y = 100

# Set image size
opts.image_size = drawing.Size(1728, 1078)

# Save PPT as TIFF
presentation.save("ppt-to-tiff-custom-image.tiff", slides.export.SaveFormat.TIFF, opts)

사용자 지정 픽셀 형식을 사용하여 Python PowerPoint를 TIFF로

Python용 Aspose.Slides를 사용하면 결과 TIFF 이미지의 픽셀 형식을 설정할 수도 있습니다. 아래 단계에 따라 수행할 수 있습니다.

  • Presentation 클래스를 사용하여 PPT/PPTX 프레젠테이션을 로드합니다.
  • TiffOptions 클래스의 인스턴스를 만듭니다.
  • TiffOptions.pixel\format 속성을 사용하여 원하는 픽셀 형식을 설정합니다.
  • Presentation.save(string, SaveFormat.TIFF, TiffOptions) 메서드를 사용하여 프레젠테이션을 TIFF로 변환합니다.

다음 코드 샘플은 Python을 사용하여 PPT에서 TIFF로 변환하는 픽셀 형식을 사용자 지정하는 방법을 보여줍니다.

import aspose.slides as slides

# Load presentation
presentation = slides.Presentation("presentation.pptx")

# Instantiate the TiffOptions class
opts = slides.export.TiffOptions()

# Set pixel format
opts.pixel_format = slides.export.ImagePixelFormat.FORMAT8BPP_INDEXED

# Save PPT as TIFF
presentation.save("ppt-to-tiff-pixel-format.tiff", slides.export.SaveFormat.TIFF, opts)

무료 라이선스 받기

임시 라이선스를 요청하면 Python용 Aspose.Slides를 평가 제한 없이 사용할 수 있습니다.

결론

이 기사에서는 Python에서 PowerPoint PPT를 TIFF로 변환하는 방법을 배웠습니다. 또한 이미지 크기를 사용자 지정하고, 숨겨진 슬라이드를 포함하고, 압축 유형을 설정하고, 결과 TIFF의 픽셀 형식을 정의하는 방법을 살펴보았습니다. 또한 문서를 방문하여 Python용 Aspose.Slides의 다른 기능을 탐색할 수 있습니다. 또한 질문이나 질문을 포럼에 게시할 수 있습니다.

또한보십시오