5.0

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

Convert to Cursor

by Richard Medlock

 

24 Apr 2003 (Updated 28 Apr 2003)

No BSD License  

Converts image files to cursor CData.

Download Now | 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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com