Bmp.rc
上传用户:s6549606
上传日期:2015-11-11
资源大小:12002k
文件大小:6k
源码类别:

图形图像处理

开发平台:

Visual C++

  1. #include "bmp.h"
  2. /////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Menu
  5. //
  6. BMPMENU MENU DISCARDABLE 
  7. BEGIN
  8.     POPUP "File"
  9.     BEGIN
  10.         MENUITEM "Open",                        IDM_LOADBMP
  11.         MENUITEM "Exit",                        IDM_EXIT
  12.     END
  13.     POPUP "Geometric Transform"
  14.     BEGIN
  15.         MENUITEM "Translation...",              IDM_TRANSLATION
  16.         MENUITEM "Rotation...",                 IDM_ROTATION
  17.         MENUITEM "Mirror X Direction",          IDM_MIRRORX
  18.         MENUITEM "Mirror Y Direction",          IDM_MIRRORY
  19.         MENUITEM "Transpose",                   IDM_TRANSPOSE
  20.         MENUITEM "Zoom...",                     IDM_ZOOM
  21.     END
  22.     POPUP "Smoothing && Sharpening"
  23.     BEGIN
  24.         MENUITEM "Box Smoothing",               IDM_SMOOTHING_BOX
  25.         MENUITEM "Gauss Smoothing",             IDM_SMOOTHING_GAUSS
  26.         POPUP "Median Filtering"
  27.         BEGIN
  28.             MENUITEM "Horizontal",                  IDM_HMEDIAN
  29.             MENUITEM "Vertical",                    IDM_VMEDIAN
  30.         END
  31.         MENUITEM SEPARATOR
  32.         MENUITEM "Laplacian Sharpening",        IDM_SHARPENING_LAPLACIAN
  33.     END
  34.     POPUP "Halftone"
  35.     BEGIN
  36.         MENUITEM "Limb Pattern M3",             IDM_LIMBPATTERNM3
  37.         MENUITEM "Limb Pattern M4",             IDM_LIMBPATTERNM4
  38.         MENUITEM SEPARATOR
  39.         MENUITEM "Floyd Steinberg",             IDM_STEINBERG
  40.         MENUITEM SEPARATOR
  41.         MENUITEM "Bmp to Txt",                  IDM_BMP2TXT
  42.     END
  43.     POPUP "Color Operation"
  44.     BEGIN
  45.         MENUITEM "True to 256",                 IDM_TRUE256
  46.         MENUITEM "Color to Grayscale",          IDM_CLRGRAY
  47.         MENUITEM "Invert",                      IDM_INVERT
  48.         MENUITEM SEPARATOR
  49.         MENUITEM "Contrast Stretching...",      IDM_CONTSTRETCH
  50.         MENUITEM "Cliping...",                  IDM_CLIPING
  51.         MENUITEM "Thresholding...",             IDM_THRESHOLD
  52.         MENUITEM "Slicing without Background...", IDM_SLICEWITHOUTBACK
  53.         MENUITEM "Slicing with Background...",  IDM_SLICEWITHBACK
  54.         MENUITEM SEPARATOR
  55.         MENUITEM "Histogram Display...",        IDM_HISTOGRAM
  56.         MENUITEM "Histogram Equalization",      IDM_HISTOGRAMEQUA
  57.     END
  58.     POPUP "Morph"
  59.     BEGIN
  60.         POPUP "Dilation"
  61.         BEGIN
  62.             MENUITEM "Horizontal",                  IDM_HDILATION
  63.             MENUITEM "Vertical",                    IDM_VDILATION
  64.         END
  65.         POPUP "Erosion"
  66.         BEGIN
  67.             MENUITEM "Horizontal",                  IDM_HEROSION
  68.             MENUITEM "Vertical",                    IDM_VEROSION
  69.         END
  70.         POPUP "Open"
  71.         BEGIN
  72.             MENUITEM "Horizontal",                  IDM_HOPEN
  73.             MENUITEM "Vertical",                    IDM_VOPEN
  74.         END
  75.         POPUP "Close"
  76.         BEGIN
  77.             MENUITEM "Horizontal",                  IDM_HCLOSE
  78.             MENUITEM "Vertical",                    IDM_VCLOSE
  79.         END
  80.         MENUITEM SEPARATOR
  81.         MENUITEM "Thinning",                    IDM_THINNING
  82.     END
  83.     POPUP "Edge Detection"
  84.     BEGIN
  85.         POPUP "Sobel"
  86.         BEGIN
  87.             MENUITEM "Horizontal",                  IDM_HSOBEL
  88.             MENUITEM "Vertical",                    IDM_VSOBEL
  89.         END
  90.         POPUP "Isotropic Sobel"
  91.         BEGIN
  92.             MENUITEM "Horizontal",                  IDM_HISOSOBEL
  93.             MENUITEM "Vertical",                    IDM_VISOSOBEL
  94.         END
  95.         MENUITEM "Laplacian of Gaussian",       IDM_LOG
  96.         MENUITEM SEPARATOR
  97.         MENUITEM "Hough",                       IDM_HOUGH
  98.         MENUITEM "Outline",                     IDM_OUTLINE
  99.         MENUITEM "SeedFill",                    IDM_SEEDFILL
  100.         MENUITEM "Contour Following",           IDM_CONTOUR
  101.     END
  102.     POPUP "Image Detection"
  103.     BEGIN
  104.         POPUP "Projection"
  105.         BEGIN
  106.             MENUITEM "Horizontal",                  IDM_HPROJECTION
  107.             MENUITEM "Vertical",                    IDM_VPROJECTION
  108.         END
  109.         MENUITEM "Subtraction",                 IDM_SUBTRACTION
  110.     END
  111.     POPUP "Compression && Coding"
  112.     BEGIN
  113.         MENUITEM "Run Length",                  IDM_RUNLENGTH
  114.         MENUITEM "Jpeg",                        IDM_JPEG
  115.     END
  116. END
  117. /////////////////////////////////////////////////////////////////////////////
  118. //
  119. // Dialog
  120. //
  121. INPUTBOX DIALOG DISCARDABLE  222, 17, 281, 166
  122. STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
  123. CAPTION "InputBox"
  124. FONT 8, "System"
  125. BEGIN
  126.     EDITTEXT        ID_XOFFSET,43,28,44,12,ES_AUTOHSCROLL | ES_WANTRETURN
  127.     EDITTEXT        ID_YOFFSET,43,50,44,12,ES_AUTOHSCROLL | ES_WANTRETURN
  128.     EDITTEXT        ID_ANGLE,114,45,53,12,ES_AUTOHSCROLL | ES_WANTRETURN
  129.     EDITTEXT        ID_ZOOMRATIO,17,114,53,12,ES_AUTOHSCROLL | ES_WANTRETURN
  130.     EDITTEXT        ID_FIRSTPOINT,151,82,28,12,ES_AUTOHSCROLL | 
  131.                     ES_WANTRETURN
  132.     EDITTEXT        ID_SECONDPOINT,151,101,28,12,ES_AUTOHSCROLL | 
  133.                     ES_WANTRETURN
  134.     EDITTEXT        ID_STRETCHRATIO,151,120,28,12,ES_AUTOHSCROLL | 
  135.                     ES_WANTRETURN
  136.     EDITTEXT        ID_EQUASCALE,210,45,53,12,ES_AUTOHSCROLL | ES_WANTRETURN
  137.     DEFPUSHBUTTON   "OK",IDOK,124,146,32,14,WS_GROUP
  138.     CTEXT           "x:",IDC_STATIC,11,29,23,12
  139.     CTEXT           "Please input offset",IDC_STATIC,9,17,72,8
  140.     CTEXT           "y:",IDC_STATIC,11,50,23,12
  141.     GROUPBOX        "Translation",IDC_STATIC,5,4,88,68
  142.     CTEXT           "Please input angle(CW)",IDC_STATIC,100,20,80,8
  143.     GROUPBOX        "Rotation",IDC_STATIC,97,4,88,68
  144.     LTEXT           "Please input ratio",IDC_STATIC,17,83,64,8
  145.     GROUPBOX        "Zoom",IDC_STATIC,5,73,88,65
  146.     LTEXT           "(0.25<=ratio<=4)",IDC_STATIC,17,97,56,11
  147.     GROUPBOX        "Contrast Stretching",IDC_STATIC,97,73,88,65
  148.     LTEXT           "first point:",IDC_STATIC,100,83,47,12
  149.     LTEXT           "ratio:",IDC_STATIC,100,119,47,12
  150.     LTEXT           "second point:",IDC_STATIC,100,101,47,12
  151.     LTEXT           "Please input gray scale",IDC_STATIC,192,20,84,8
  152.     GROUPBOX        "Histogram Equalization",IDC_STATIC,189,4,90,68
  153. END