Search Persits Software Knowledge Base


Article PS050210149

HOWTO: Convert CMYK images to RGB

Problem Summary

CMYK images cannot be viewed over the web. This article explains how to convert an image from the CMYK to RGB color space for web viewing.


Starting with version 1.5, AspJpeg is capable of converting JPEG and TIFF images created in the CMYK color space to JPEG images in the RGB color space. The conversion is performed by calling the ToRGB method which accepts no arguments and returns no values. If the image being converted is not a CMYK, the method will simply do nothing.

For better performance, it is advisable to call this method after setting the new image width and height, if applicable:

Jpeg.Open "c:\path\image.jpg"
Jpeg.PreserveAspectRatio = True
Jpeg.Width = 100

Jpeg.ToRGB ' Convert to RGB

Jpeg.Save "c:\path\thumb.jpg"

The latest version of AspJpeg can be downloaded from

Created: 2/10/2005 9:40:33 AM
Last Modified: 2/10/2005 9:40:33 AM

Copyright © Persits Software, Inc. 1998 - 2018
For technical support, write to