Maintain Native Pixel Dimensions with an image

1 回表示 (過去 30 日間)
Tayler
Tayler 2014 年 4 月 17 日
回答済み: Image Analyst 2014 年 4 月 18 日
Whenever I create an image the upscales to fit the axes. How do I keep the same image size. The image is 70x70 pixels and is being used in a drag and drop fashion. Here is the code:
function startmove(img, evnt, main, dimension)
gui = get(gcf, 'UserData');
% Remove mouse pointer set(gcf,'PointerShapeCData',nan(16,16)); set(gcf,'Pointer','custom'); a = axes('parent', main, 'units', 'normalize',... 'position', [0, 0, 1,1]); set(img, 'parent', a); axis off

回答 (1 件)

Image Analyst
Image Analyst 2014 年 4 月 18 日
Maybe try this
imshow(yourImage, 'InitialMagnification', 100);

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by