How encode_jpeg works?

Hi all,

I wonder how exactly encode_jpeg works.
https://pytorch.org/vision/main/generated/torchvision.io.encode_jpeg.html
I cannot trace the source code of this function.

Anyone knows how this function works internally.
We know that JPEG compression algorithm has many different settings.
But the pytorch documentation has nothing about it.

Thanks.

You can check the source code to see how the data is encoded via libjpeg.

Thank @ptrblck . Look like Pytorch just calls libjpeg and uses default settings. I do not see any specific settings