# \#image-compression

**URL:** https://forums.swift.org/tag/image-compression/487.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [\[Demo Code of Vapor v4+\] Image processing: upload, store download](https://forums.swift.org/t/demo-code-of-vapor-v4-image-processing-upload-store-download/66793)

<div class="topic-metadata">

**Author:** [@Ric](https://forums.swift.org/u/Ric)\
**Replies:** 12\
**Last updated:** [October 20, 2024, 1:18am UTC](https://forums.swift.org/t/demo-code-of-vapor-v4-image-processing-upload-store-download/66793 "2024-10-20T01:18:37Z")

</div>

I'm a professional Swift coder, Vapor Neophyte. I'm trying to learn how to upload & download an arbitrary image. I'm using Vapor v4.77 (Concurrency). I need complete demo code to piece the parts into a cohesive whole …

---

## [Compressing Images for PDFKit](https://forums.swift.org/t/compressing-images-for-pdfkit/44679)

<div class="topic-metadata">

**Author:** [@cj.whitaker](https://forums.swift.org/u/cj.whitaker)\
**Replies:** 1\
**Last updated:** [February 12, 2021, 8:20am UTC](https://forums.swift.org/t/compressing-images-for-pdfkit/44679 "2021-02-12T08:20:43Z")

</div>

NSData \*jpegData = UIImageJPEGRepresentation(sourceImage, 0.75); CGDataProviderRef dp = CGDataProviderCreateWithCFData((\_\_bridge CFDataRef)jpegData); CGImageRef cgImage = CGImageCreateWithJPEGDataProvider(dp, NULL, true,…
