heif hevc_如何使您的iPhone使用JPG和MP4文件代替HEIF,HEIC和HEVC

heif hevc

heif hevc

In iOS 11, the photos and videos you take will no longer be encoded in the compatible formats you’re used to. Instead of JPG for images and MPEG-4 for video, they’ll use High Efficiency Image Format (HEIF) and High Efficiency Video Format (HEVC), respectively. Files in these newer formats are about half the size of JPG and MP4 files of similar quality.

在iOS 11中, 您拍摄照片和视频将不再使用您惯用的兼容格式进行编码 。 它们将分别使用高效图像格式(HEIF)和高效视频格式(HEVC),而不是用于图像的JPG和用于视频的MPEG-4。 这些更新格式的文件大约是质量类似的JPG和MP4文件的一半。

Encoding files in HEIF (using the .HEIC extension) and HEVC (using the .MOV extension) requires a bit more processing power, so this change is only coming to the iPhone 7, iPhone 7 Plus, iPhone 8, iPhone 8 Plus, iPhone X, and the latest generation iPad Pro models. Also, it’s worth noting that this change will only affect new photos you capture, iOS11 won’t change any photos or videos you’ve already taken.

在HEIF(使用.HEIC扩展名)和HEVC(使用.MOV扩展名)中编码文件需要更多处理能力,因此此更改仅适用于iPhone 7,iPhone 7 Plus,iPhone 8,iPhone 8 Plus,iPhone X和最新一代的iPad Pro机型。 另外,值得注意的是,此更改只会影响您捕获的新照片,iOS11不会更改您已经拍摄的任何照片或视频。

While HEIF and HEVC are great in theory, they aren’t as widely supported as JPG and MP4 yet (which are essentially universal at this point). For example, you need to upgrade your Mac to macOS High Sierra for it to be able to edit HEIF and HEVC files. And if you use Windows 10, they aren’t compatible out of the box yet.

尽管HEIF和HEVC在理论上很出色,但它们还没有像JPG和MP4那样得到广泛支持(在这一点上它们基本上是通用的)。 例如,您需要将Mac升级到macOS High Sierra,才能编辑HEIF和HEVC文件。 而且,如果您使用的是Windows 10,则尚未兼容。

If you’d rather capture your photos and videos in a more widely compatible format, you can do so with a simple settings toggle. Here’s how.

如果您想以更广泛兼容的格式捕获照片和视频,可以通过简单的设置切换来实现。 这是如何做。

Go to Settings > Camera > Format and select Most Compatible instead of High Efficiency.

转到设置>相机>格式,然后选择最兼容,而不是高效。

Now your iPhone will keep using the older, larger, more compatible formats.

现在,您的iPhone将继续使用更旧,更大,更兼容的格式。

翻译自: https://www.howtogeek.com/327689/how-to-make-your-iphone-use-jpg-and-mp4-files-instead-of-heif-and-hevc/

heif hevc

### 回答1: 如果您想将图像从其他格式转换为HEIF(High Efficiency Image Format)格式,可以使用以下代码: ``` import imageio def convert_to_heif(input_file, output_file): image = imageio.imread(input_file) imageio.imwrite(output_file, image, format='heif') # 调用转换函数 convert_to_heif('input.jpg', 'output.heif') ``` 此代码使用Python 库 `imageio`,因此需要先安装该库,可以使用以下命令进行安装: ``` pip install imageio ``` 希望对您有所帮助! ### 回答2: 转换HEIF(High Efficiency Image Format)的代码可以使用图像处理库来实现。以下是一个示例,使用Pillow库进行转换: ```python from PIL import Image def convert_to_heif(image_path, output_path): # 打开原始图像 image = Image.open(image_path) # 将图像保存为HEIF格式 image.save(output_path, 'heif') # 示例用法 convert_to_heif('input.jpg', 'output.heic') ``` 在这个示例中,`convert_to_heif`函数接收两个参数:原始图像的路径和输出HEIF图像的路径。首先,它使用Pillow库的`Image.open`方法打开原始图像。然后,它使用`save`方法将图像保存为HEIF格式,并指定文件的输出路径和文件类型('heif')。最后,通过调用`convert_to_heif`函数,可以将指定的JPG图像转换为HEIF图像。 请注意,上述示例代码仅适用于安装了Pillow库的Python环境,并且HEIF文件格式的读取和写入已经在该库中配置。如果您的环境不满足这些要求,您可能需要使用其他工具或库来完成HEIF格式的转换。 ### 回答3: 转换图片格式HEIF格式的代码如下: ``` import cv2 def convert_to_heif(image_path, output_path): # 读取输入图片 image = cv2.imread(image_path) # 构建HEIF编码器 heif_encoder = cv2.heif_writer(output_path) # 将图片写入HEIF编码器 heif_encoder.write(image) # 释放HEIF编码器 heif_encoder.release() print("图片已成功转换为HEIF格式") # 示例使用 input_image = "input.jpg" output_image = "output.heif" convert_to_heif(input_image, output_image) ``` 上述代码中,使用了OpenCV库的heif_writer函数来实现将图片转换为HEIF格式。首先通过`cv2.imread`读取输入图片,然后创建一个HEIF编码器对象`heif_encoder`。接下来,使用`heif_encoder.write`将输入图片写入HEIF编码器,最后通过`heif_encoder.release()`释放编码器。转换完成后,会打印出"图片已成功转换为HEIF格式"的提示信息。 示例中的输入图片为"input.jpg",输出图片为"output.heif",可以根据实际情况修改。需要确保在运行代码之前已经安装了OpenCV库。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值