CUR (.cur)

BackgroundBackground

    Microsoft Windows cursor.
    Raster image file format.
    Native cursor format on Windows.
    CUR is an acronym derived from cursor.
    Binary format.
    Can store multiple cursors at different color resolutions.
    Supports alpha channels.
    Similar to ICO format.

Import and ExportImport and Export

  • Import["file.cur"] imports a CUR file, returning all cursors stored in the file as a list of Image objects.
  • Import["file.cur",elem] imports the specified element from a CUR file.
  • The import format can be specified with Import["file","CUR"] or Import["file",{"CUR",elem,}].
  • Export["file.ico",expr] exports an image, graphics, or a list of them to a CUR file.
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the Windows bitmap format.

ElementsElements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"array of color values for each cursor
    "GraphicsList"list of graphics objects
    "HotSpot"pixel coordinates for each cursor's hot spot
    "ImageList"all cursors, given as a list of Image objects
  • Import by default uses the "ImageList" element for CUR files.
  • Advanced Import elements:
  • "BitDepth"number of bits used to represent each color channel
    "Channels"the number of color channels used in the file
    "ColorSpace"color encoding used in the file
    "ImageSize"raster dimensions
    "Summary"summary of the file
    "SummarySlideView"summary of all images in the file
    "ImageCount"number of images stored in the file
  • ICO supports a maximum of 256×256 pixel images. Export will scale down Image and Graphics larger than 256 pixels to fit.

OptionsOptions

  • Export option:
  • "HotSpot"Automaticpixel coordinate of the cursor's hot spot
  • Export by default places the hot spot at the top-left corner of the cursor.
  • The following settings for "HotSpot" are supported:
  • Automatictop-left corner of the image with borders removed
    "TopLeft"top-left corner of the image with borders removed
    "TopRight"top-right corner of the image with borders removed
    "BottomLeft"bottom-left corner of the image with borders removed
    "BottomRight"bottom-right corner of the image with borders removed
    {x,y}explicit pixel coordinate

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Import a CUR file:

In[1]:=
Click for copyable input
Out[1]=

Summary of the image:

In[1]:=
Click for copyable input
Out[1]=

Export a cursor image to CUR:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2007
(6.0)
| Updated in 2016
(11.0)