# What image formats do you use within Julia?

**URL:** https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333
**Category:** Community
**Tags:** images, io, juliaimages
**Created:** [May 16, 2024, 3:25am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333 "2024-05-16T03:25:49Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 16, 2024, 3:25am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/1 "2024-05-16T03:25:49Z")

</div>

Hello all!

I often use SVG images _without_ using Cairo.jl or Luxor.jl. I am probably in the “minority”. For raster images, I tend to use PNG.

So, what image formats do you use within Julia?

While the question does not provide academically meaningful statistics, it may help package developers determine what formats they need to focus their support on.

When replying, please mention **one specific format** to avoid duplication.  
( **Edit:** If you use more than one format, I want you to write multiple reply. Even though there are differences in application, you may express your agreement by pressing the LIKE🩷 button.)  
Particularization (e.g., “PNG _with alpha channel_”) is fine, but please do not generalize (e.g., “I love both JPEG and PNG!”).

# Background

This is not to say that this is anyone’s fault, but ImageMagick has always been a troublemaker.  
We already have separate packages for commonly used formats such as JPEG or PNG. We also have a collection of those packages, ImageIO.jl.  
I’m curious to know who in the end-user base specifically relies on ImageMagick.  
This would make an opportunity to create separate packages for the specific formats (or the specific applications).

The new package will be more compatible with the JuliaImages ecosystem (especially regarding the column-/row-major issue).  
For the maintainers in JuliaImages, that has the advantage of making it harder to get into trouble with ImageMagick.  
The fattening of ImageIO might cause the same kind of trouble with ImageMagick, but it should be more controllable for us.

Also, ColorTypes.jl, which is upstream of the JuliaImages ecosystem, only supports commonly used pixel formats.  
Currently, support for bit-packing and heterogeneous types (e.g. `(c1::UInt16, c2::Int8, c3::Int8)`) is limited.  
In short, there is also room for improvement in the upstream.

* * *

In any case, since this topic is in the Community category, not everyone needs to know about the technical issues.  
Let’s talk about your favorites or creative challenges!

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 16, 2024, 7:23am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/2 "2024-05-16T07:23:22Z")

</div>

**SVG**

I use it mainly for Plots.jl output (with default GR backend).

(This is an example of answer, and my real answer.)

---

<div class="post-metadata">

### Author: ![ranocha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ranocha/32/35588_2.png) [@ranocha](https://discourse.julialang.org/u/ranocha)
#### Post date: [May 16, 2024, 3:57pm UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/3 "2024-05-16T15:57:04Z")

</div>

PDF

I mainly use PDF outputs created by plotting packages (such as Plots.jl or PyPlot.jl).

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 16, 2024, 6:55pm UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/4 "2024-05-16T18:55:05Z")

</div>

**PNG**

I use PNG to load files from the Internet and to save the results of image processing. The advantages are the lossless compression and the ability to handle alpha channels.  
I am very grateful to PNGFiles.jl.

Multiple (i.e., separate) replies are welcome _in this topic_. I also use other image formats, but I hope others will raise them.

---

<div class="post-metadata">

### Author: ![mihalybaci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mihalybaci/32/13528_2.png) [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)
#### Post date: [May 16, 2024, 7:10pm UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/5 "2024-05-16T19:10:54Z")

</div>

**JPEG**

Since my phone camera exports JPEGs, and I have a couple tools for image things with JPEG. I have also run into some (minor) issues being able to easily extract the EXIF data, so simpler way to do that would be awesome! (edit: see below!)

(may I also suggest users give hearts for the formats they use?)

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 16, 2024, 7:30pm UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/6 "2024-05-16T19:30:52Z")

</div>

For the reference of everyone reading this topic, we have the Libexif wrapper, ExifViewer.jl.

> [@mihalybaci](#):
>
> (may I also suggest users give hearts for the formats they use?)

Anything that can make this topic more active is welcome.  
(If it gets out of control, it will just be locked at that point.😁)

---

<div class="post-metadata">

### Author: ![mihalybaci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mihalybaci/32/13528_2.png) [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)
#### Post date: [May 17, 2024, 11:56am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/7 "2024-05-17T11:56:23Z")

</div>

Oh, great tip on ExifViewer.jl! My issues were in the past before this package was registered, so its nice to see this!

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 18, 2024, 12:31am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/8 "2024-05-18T00:31:23Z")

</div>

**TIFF**

[https://discourse.julialang.org/search?q=tiff%20in%3Atitle](https://discourse.julialang.org/search?q=tiff%20in%3Atitle)  
It features multi-page and floating-point supports. (Conversely, they require some care in handling.)

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 18, 2024, 12:40am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/9 "2024-05-18T00:40:54Z")

</div>

**GIF**

[https://discourse.julialang.org/search?q=gif%20in%3Atitle](https://discourse.julialang.org/search?q=gif%20in%3Atitle)

The most important feature of GIF is animation.  
Although various web services and media nowadays support video files, there are still many situations where GIFs are useful.

We now have a separate package, GIFImages.jl.

> <https://github.com/JuliaIO/ImageIO.jl/pull/55>
>
> WIP, GIFImages has load with io and file method and save with just file approach…. Test error out right now but I am not able to understand why as fileio\_save with filepath is available.
> \- \[\] Add GIF format to ImageIO

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 18, 2024, 12:58am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/10 "2024-05-18T00:58:32Z")

</div>

**WebP**

[https://discourse.julialang.org/search?q=%22webp%20%22%20in%3Atitle](https://discourse.julialang.org/search?q=%22webp%20%22%20in%3Atitle)  
There have been ways to handle WebP in Julia for a while. Last month WebP.jl was launched!

> <https://github.com/JuliaIO/ImageIO.jl/pull/67>
>
> Adds support for WebP. \<strike\>- provided https://github.com/JuliaRegistries/Gen…eral/pull/104921 is merged.\</strike\>

---

<div class="post-metadata">

### Author: ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)
#### Post date: [May 22, 2024, 8:47am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/11 "2024-05-22T08:47:16Z")

</div>

Of course it depends on what I’m using the graphics for: Microsoft Office, for instance, does not accept PDF (or any vector graphics, from my understanding), so exporting all my graphics as PDF is a great way to make sure I never have to collaborate with someone in Microsoft Office.

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 22, 2024, 9:22am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/12 "2024-05-22T09:22:53Z")

</div>

Recent versions of Microsoft Office support SVG, although that is not perfect.  
Of course, the traditional WMF and EMF are still supported.  
(Also, Microsoft Word “partially” supports PDF import, although I don’t think that is practical.)

Perhaps you are joking, but there should be a distinction between choosing the appropriate format for a purpose and being exclusive.  
My aim behind this topic is to help the Julia ecosystems provide inclusive supports to the extent practicable.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [May 22, 2024, 12:02pm UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/13 "2024-05-22T12:02:05Z")

</div>

Microsoft Edge opens PDF files without problem.  
Microsoft Word opens the PDF and converts it to an editable Word file.  
And then there are many free viewers and editors in Windows.  
No junk, no excuses.

---

<div class="post-metadata">

### Author: ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)
#### Post date: [May 23, 2024, 5:12am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/14 "2024-05-23T05:12:08Z")

</div>

I mean specifically as an image format.  
You cannot import a PDF graphic into a Word document or PowerPoint presentation.

SVG is an annoying choice since that’s the one format that works worst in LaTeX, but I guess it’s nice there’s a working format now.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 23, 2024, 7:06am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/15 "2024-05-23T07:06:12Z")

</div>

Vector graphics for figures I generate (PDF, SVG, PS).  
JPG for web related camera images.  
I sometimes will use TIFF for microscopy images.  
All other cases I’ll use PNG.

But I’m also excited about HEIF and WebP…!

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 25, 2024, 1:39am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/16 "2024-05-25T01:39:53Z")

</div>

(cherry-picking)

**PS**

In the modern LaTeX environment, it is the practice to use PDF when working with PostScript-based figures.  
However, PS files have the advantage that they are text files, making it easier to edit margins, etc.

---

<div class="post-metadata">

### Author: ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)
#### Post date: [May 25, 2024, 2:18am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/17 "2024-05-25T02:18:34Z")

</div>

(cherry-picking)

**HEIF / HEIC**

Strictly speaking, HEIF is a container format, but it effectively refers to images encoded in H.265/HEVC (as HEIC).

At this point, it seems somewhat difficult to handle HEIF in Julia.  
ImageMagick.jl supports HEIF, but fails to load some image files.  
VideoIO.jl does not appear to support HEIF. Perhaps we need to do some low level command processing with FFMPEG.jl.  
Also, be aware of patent issues regarding the use of HEVC. A similar format that is royalty-free is [AVIF](https://en.wikipedia.org/wiki/AVIF).

Please provide information.

---

<div class="post-metadata">

### Author: ![hamza\_souidi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hamza_souidi/32/218956_2.png) [@hamza\_souidi](https://discourse.julialang.org/u/hamza_souidi)
#### Post date: [March 2, 2025, 1:31am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/18 "2025-03-02T01:31:39Z")

</div>

Hi , I wrote this small wrapper to the libavif C library .It enables encoding and decoding Avif files . Here you go [GitHub - imohag9/AvifSupport.jl: Julia interface to libavif](https://github.com/imohag9/AvifSupport.jl)

---

<div class="post-metadata">

### Author: ![Bectuld3](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bectuld3](https://discourse.julialang.org/u/Bectuld3)
#### Post date: [March 8, 2025, 11:00am UTC](https://discourse.julialang.org/t/what-image-formats-do-you-use-within-julia/114333/19 "2025-03-08T11:00:20Z")

</div>

colorview can be used to convert a numeric array into the image format that juliaimages uses.
