No BSD License  

Highlights from
Convert to Cursor

5.0

5.0 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 717 Bytes File ID: #3328

Convert to Cursor

by Richard Medlock

 

24 Apr 2003 (Updated 28 Apr 2003)

Converts image files to cursor CData.

| Watch this File

File Information
Description

Use a standard paint program like paint shop pro to edit your icons, save them in a MATLAB compatible format (bmp, png, jpeg, etc..)

Use White [RGB(255,255,255)] for areas you want white.

Use Black [RGB(0,0,0)] for areas you want black.

All other colors will be made transparent.

Example:

i = imread('mycursor.bmp');
CData = ConvertToCursor(i);
set(gcf,'Pointer','Custom','PointShapeCData',CData);

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
24 Dec 2003 Muhammad Abu E

it is a tooooooooooo greate

14 Jan 2004 tgy tyg

tfg

04 Feb 2008 Reza Jahanbin

Alternatively you can avoid the double loop and reduce the code to the following line:

c2c = nan(size(i,1), size(i,2)); c2c(sum(i, 3)==765) = 2; c2c(sum(i, 3)==0) = 1;

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui tools Richard Medlock 22 Oct 2008 07:00:23
example Richard Medlock 22 Oct 2008 07:00:23
convert Richard Medlock 22 Oct 2008 07:00:23
cursor Richard Medlock 22 Oct 2008 07:00:23
cdata Richard Medlock 22 Oct 2008 07:00:23
icon Richard Medlock 22 Oct 2008 07:00:23
bitmap image Richard Medlock 22 Oct 2008 07:00:23

Contact us at files@mathworks.com