⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notes.txt

📁 图像处理
💻 TXT
字号:
Notes in Picture processing fun  by Robert Rayment. Nov 2001.


Hopefully the description on the buttons is sufficient to give a
good indication of what they do.  Where processes can take changes
in varying steps (shown by a # on the button) these can be set by
the Stepper frame as 1,2 4 or 8 step increments.  Some effects
leave gaps in the picture and these can be filled by the color
selected in the ColorX frame when the button caption has ColorX.
All effects bar crazy mirrors, some palette effects, extraction and
resizing can be looped by toggling the LOOP OFF/ON button. This gives 
progressive changes until the STOP LOOP button is pressed.

Note that rectangle extraction and resizing are non-reversible, this
is because the method saves to the disk and re-loads the changed 
picture.  Bitmaps can only be saved as BMP files which can of course
easily be converted using MSPaint or whatever.  The need sometimes
for conversion to legal 16-bit colors was explained in my Palette
Processing prog on PSC.

One very good prog to develop filters is PaintShop Pro which has up
to a 7x7 matrix.

Assembler is not necessary to run this prog but can be toggled on/off
by pressing the CODE VB button.  All the ASM files are included.  I have
chosen to make each routine fairly stand alone and this leads to a lot
of duplication.  The size could be at least halved and optimized a lot 
but would be much harder to follow.  The API GetDIBITS is used to get
the bitmap pixels to a 32-bit surface.  This has the advantage that some
of the assembler can then easily use the MMX instructions which require
8-byte chunks.  For just VB a 24-bit surface would be fine.  Generally 
the assembler follows the VB code fairly closely.  The method used is 
based on the API CallWindowsProc ( as originally put forward by Ulli).  
The machine code binary files are included in a resource file ( See my 
prog VB, Assembler and Resource Files prog on PSC).  For reasons I have
yet to fathom the assembler does not always reproduce the VB code at the 
pixel level though this hardly ever matters ( the exception is repeated 
application of the Relief effect).  There is no assembler for crazy 
mirrors or for scrolling and shifting.  The latter two use the CopyMemory 
API which more or less duplicates what would be necessary in machine code.

 USING MACHINE CODE

 Using NASM. Netwide Assembler freeware from
 www.web-sites.co.uk/nasm/
 ftp://ftp.uk.kernel.org/pub/software/devel/nasm/
 & other sites
 see also
 www.geocities.com/SunsetStrip/Stage/8513/assembly.html
 &
 www.geocities.com/emami_s/Draw3D.html by Shervin Emami.

 TASM is not too dissimilar to NASM and could equally well be used.
 A386 is also good but not free.

It is a disappointment to me that not more programmers have taken up
mixed VB-assembler programming

There are bound to be a bugs somewhere and since the programmer is the
last person to find them - reports would be welcome.

 Submitted to P..S..Code November 2001

Cheers.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -