转换JPEG色彩空间(Adobe RGB的为sRGB)在Windows(.NET) [英] Converting JPEG colorspace (Adobe RGB to sRGB) on Windows (.Net)

查看:1310
本文介绍了转换JPEG色彩空间(Adobe RGB的为sRGB)在Windows(.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从大照片生成缩略图和中等大小的图像。
这些较小的照片是在一个网上画廊展出。很多摄影师正在提交使用Adobe RGB的JPEG图像。
我想使用sRGB所有的缩略图和中等大小的图像

I need to generate thumbnail and medium sized images from large photos. These smaller photos are for display in an online gallery. Many of the photographers are submitting JPEG images using Adobe RGB. I would like to use sRGB for all thumbnails and medium size images

我现在用的dotnet(asp.net),并需要一种方法来从Adobe RGB转换为sRGB不会失去任何质量。

I am using dotnet (asp.net) and need a way to convert from Adobe RGB to sRGB without losing any quality.

推荐答案

背景信息:JPG文件有红,绿,蓝,无论是的sRGB,Adobe RGB的,或者纯醇'RGB 8位。国际刑事法院决定描述色彩空间。有时这被嵌入的jpg文件。有时,指定的sRGB的EXIF色彩空间标签A001标志= 1,有是Adobe RGB没有标准的标志,但在EXIF标签A001为Adobe RGB的某些应用程序和相机使用65535(未校准)。

Background info: Jpg files have 8 bits of red, green, and blue, whether sRGB,Adobe RGB, or plain ol' RGB. The ICC descriptor determines the color space. Sometimes this is embedded in the jpg file. Sometimes there is a flag to designate sRGB, Exif Colorspace tag a001 = 1. There is no standard flag for Adobe RGB, but some applications and cameras use 65535 (uncalibrated) for Adobe RGB in the exif tag A001.

要转换从一个ICC配置文件(色彩)到另一个jpg文件,可以使用CreateColorTransform创建色彩空间之间的transorm。您将需要为源(Adobe RGB的)和目标(sRGB)可颜色空间提供ICC配置文件。

To convert a jpg file from from one ICC profile (colorspace) to another, you can use CreateColorTransform to create a transorm between the color spaces. You will need to provide the ICC profile for the source (Adobe RGB) and destination (sRGB) color spaces.

在你的变换,使用TranslateBitmapBits调整的像素。它可能会更容易与图象作为一个DIBSection工作

After you have the transform, use TranslateBitmapBits to adjust the pixels. It may be easier to work with the image as a DIBSection.

这可能有点复杂,在.asp的写,所以它可能是更容易使用的图形库,做到这一点。

This may be a bit complex to write in .asp, so it might be easier to use a graphics library that does this.

这篇关于转换JPEG色彩空间(Adobe RGB的为sRGB)在Windows(.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆