.RAS

RAS File

Sun Raster Image File
Ask a question
QUICK ANSWER

A RAS file is a Sun Raster bitmap image created by Sun Microsystems in 1986 for SunOS/Solaris workstations. To open it, use GIMP, IrfanView, or XnView - all free and natively supported. The format is obsolete; convert to PNG for everyday use or TIFF for archival work.

Developer: Sun Microsystems (now Oracle) Category: Raster Image Files Open standard MIME: image/x-sun-raster
OPENS ON Windows macOS Linux Web
Related: .JPG · .PNG · .TIF · .ECW

On this page

19k+ extensions indexed
Last reviewed Jul 21, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the RAS file format?

A .ras file is a Sun Raster Image, a bitmap format introduced by Sun Microsystems in 1986 alongside SunOS 3.x. It was the native screen-capture and image-exchange format for Sun workstations and remained standard across SunOS and Solaris environments for decades.

The file begins with a 32-byte fixed header containing eight big-endian 32-bit integers: a unique magic number (0x59A66A95), image width, height, bit depth, data length, image type, colormap type, and colormap length. An optional colormap follows for indexed-color images (1, 4, or 8 bpp), then raw pixel data with scan lines padded to 16-bit boundaries.

Several image type codes are defined: RT_STANDARD (type 1, uncompressed), RT_BYTE_ENCODED (type 2, run-length encoding), and RT_FORMAT_RGB (type 3, 24-bit RGB). Standard 24-bit images (RT_STANDARD) store pixels in BGR order - the reverse of most modern formats. Color depths supported are 1, 4, 8, 24, and 32 bpp (the 32-bit mode adds an unused pad byte per pixel).

.ras is now rare on modern systems but still surfaces in legacy Solaris scientific workflows, GIS pipelines (including GMT), and older Unix image-processing chains. It can be read and converted by GIMP, ImageMagick, XnView, and IrfanView, making migration to PNG or TIFF straightforward.

Security & safety

RISK: LOW

Plain raster image data - no scripts, macros, or executable content. No known exploits specific to Sun Raster format.

Format details

in a nutshell
FULL NAMESun Raster Image Fileaka Sun rasterfile, SunOS raster bitmap
DEVELOPERSun Microsystems (now Oracle)since 1986 (SunOS 3.x)
MIME TYPEimage/x-sun-raster
TYPEUncompressed or RLE-compressed raster bitmap (binary, big-endian)
STANDARDOpen · royalty-free
This extension is also used by…
  • ERDAS Imagine Raster (some variants) - ERDAS and some GIS tools produce .ras files in Sun Raster or similar raster formats for satellite imagery; not always identical to Sun RAS.
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
59A66A95
ASCII
Y·j·
32-bit big-endian magic number 0x59A66A95, defined as RAS_MAGIC in SunOS headers. Unique identifier - no other common format uses this value.

Programs that open RAS files

Windows6 apps
PaintShop Pro Paid Open .ras via File > Open (supports Sun Raster in recent versions).
XnView Free File > Open the .ras file; XnView reads Sun Raster natively. Export to PNG, TIFF, or JPEG via File > Export.
GIMP Open-source File > Open - GIMP reads and writes Sun Raster format natively. Export to any format via File > Export As.
ACDSee Paid Browse and open .ras files directly.
IrfanView Free Open the .ras file directly; convert via File > Save As to PNG or JPEG.
ImageMagick (CLI) Open-source convert input.ras output.png - command-line batch conversion of Sun Raster files.
macOS2 apps
GIMP Open-source File > Open the .ras; export via File > Export As.
XnView MP Free Open .ras directly and convert to other formats.
Linux2 apps
GIMP Open-source File > Open - native Sun Raster support.
ImageMagick (CLI) Open-source convert input.ras output.png
Web1 app
Convertio Freemium Upload .ras and convert to PNG/JPEG/TIFF online (for small files).

Technical details

deep spec
Magic number0x59A66A95 (32-bit big-endian) at byte offset 0
Header size32 bytes (8 × 32-bit big-endian integers)
Byte orderBig-endian
Color depths1, 4, 8 (indexed), 24, 32 bpp
Pixel order (24-bit)BGR in RT_STANDARD; RGB in RT_FORMAT_RGB
Scan line padding16-bit (2-byte) alignment per row
Image type codes1=RT_STANDARD (uncompressed), 2=RT_BYTE_ENCODED (RLE), 3=RT_FORMAT_RGB, 4=RT_FORMAT_TIFF, 5=RT_FORMAT_IFF
ColormapOptional; present for 1/4/8-bit indexed images
CompressionNone (type 1) or byte-run RLE (type 2)
Maximum dimensionsUp to 2^31 − 1 pixels per axis (32-bit signed fields)
Associated OSSunOS, Solaris (native); Linux, macOS, Windows via third-party tools
Released1986 (SunOS 3.x)
Latest versionN/A (format frozen; last defined in SunOS/Solaris documentation)
Open standardYes · royalty-free
Specificationdocs.oracle.com

RAS conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with RAS files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about RAS files.

Frequently asked questions

What is a RAS file?
A Sun Raster image - a legacy bitmap format from Sun Microsystems (1986), used on SunOS/Solaris Unix workstations. Rarely created today but found in old scientific and GIS data.
How do I open a RAS file on Windows?
Use GIMP (free/open-source), IrfanView (free), or XnView (free). All read Sun Raster natively.
How do I convert a RAS file to PNG or JPEG?
Use GIMP (File > Export As), IrfanView (File > Save As), XnView, or ImageMagick from the command line: convert input.ras output.png
What is the magic number for Sun Raster files?
0x59A66A95 - a 4-byte big-endian constant at offset 0 that uniquely identifies Sun Raster files.
Is Sun Raster format still used?
Rarely. It appears in legacy Solaris systems, old GIS datasets, and scientific archives from the 1990s-2000s. PNG and TIFF have replaced it for new work.

References

1Oracle Solaris - rasterfile(5) man pagedocs.oracle.com
2fileformat.info - Sun Raster format summarywww.fileformat.info

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.PRO6XProPresenter 6 Bundle File
9.EXEWindows Executable (Portable Executable)
10.PRDXSoftMaker Presentations Document

Related extensions

.JPGJPEG Image
.PNGPortable Network Graphics
.TIFTagged Image File Format
.ECWEnhanced Compression Wavelet (ECW) image
.AVIFAV1 Image File Format (AVIF)
.JP2JPEG 2000 Image (ISO/IEC 15444-1)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z