🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.sources
Article #120

xv-2-21a changes to run on VMS, part 05/08

#120
From: Rick Dyson
Date: Wed, 04 Nov 1992 21:12
1354 lines
49974 bytes
Submitted-by: dyson@iowasp.physics.uiowa.edu (Rick Dyson)
Posting-number: Volume 3, Issue 237
Archive-name: xv-2-21_vms_changes/part05
Supersedes: xv-2-21_vms_changes: Volume 2, Issue 83-86

-+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+
Ve`20range`200--359,`20and
Xthe`20second`20and`20third`20components`20will`20have`20integer`20values`20in
V`20the`20range`200--100.
XThe`20values`20displayed`20are`20prior`20to`20any`20HSV/RGB`20modification,
V`20but`20after`20any
Xcolormap`20changes.`20`20See`20`60`60Section`205:`20The`20Color`20Editor''`20f
Vor`20details.`20`20Also,`20see
X`60`60Appendix`20D:`20RGB`20and`20HSV`20Colorspaces''`20for`20more`20informati
Von`20about`20what`20these
Xnumbers`20mean.
X
XNote:`20If`20you`20actually`20want`20to`20measure`20some`20pixels,`20it`20will
V`20probably`20help`20to
Xcrop`20to`20a`20small`20region`20of`20your`20image,`20and`20expand`20that`20re
Vgion`20to`20the`20point
Xwhere`20you`20can`20see`20the`20individual`20pixels.
X
XThis`20string`20is`20automatically`20copied`20to`20your`20X`20server's`20cut
V`20buffer`20whenever
Xyou`20measure`20pixel`20values.`20`20This`20lets`20you`20easily`20feed`20this
V`20information`20to
Xanother`20program,`20useful`20if`20you're`20doing`20manual`20feature`20extract
Vion,`20or
Xsomething.`20`20Try`20it:`20measure`20a`20pixel's`20value,`20and`20then`20go
V`20click`20your`20
X%
X\it`20Middle`20\rm%
Xmouse`20button`20in`20an`20%
X\it`20xterm`20\rm%
Xwindow.
X
X\shead`7BSection`202.2:`20`20Cropping`7D
X
XBring`20up`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow`20by`20typing`20the`20'?'`20key`20or`20clicking`20the
X%
X\it`20Right`20\rm%
Xmouse`20button`20inside`20the`20image`20window.
X
XClicking`20and`20dragging`20the`20%
X\it`20Middle`20\rm%
Xbutton`20of`20the`20mouse`20inside`20the
Ximage`20window`20will`20allow`20you`20to`20draw`20a`20cropping`20rectangle`20o
Vn`20the`20image.
XIf`20you're`20unhappy`20with`20the`20one`20you've`20drawn,`20simply`20click
V`20the
X%
X\it`20Middle`20\rm%
Xbutton`20and`20draw`20another.`20`20If`20you'd`20like`20the`20rectangle`20to
Xgo`20away`20altogether,`20click`20the`20%
X\it`20Middle`20\rm%
Xbutton`20and`20release`20it
Xwithout`20moving`20the`20mouse.
X
XYou`20can`20determine`20how`20large`20the`20cropping`20rectangle`20is`20(in
V`20image
Xcoordinates)`20by`20bringing`20up`20the`20%
X\it`20xv`20info`20\rm%
Xwindow.`20`20Do`20this`20by
Xclicking`20the`20%
X\bf`20Info`20\rm%
Xbutton`20in`20the`20%
X\it`20xv`20controls`20window`20\rm%
Xor`20by
Xtyping`20the`20'i'`20key`20into`20any`20open`20%
X`7B\it`20xv`7D
Xwindow.
X
XThe`20`7B\it`20xv`20info`20window`7D
Xwill`20display,`20among`20other`20things,`20the`20current`20size`20and
Xposition`20of`20the`20cropping`20rectangle`20in`20terms`20of`20image`20coordin
Vates.`20`20For
Xexample,`20if`20it`20says:
X\begin`7BIPlist`7D
X\IPitem`7B`7B`7D`7D
X114x77`20rectangle`20starting`20at`20119,58
X\end`7BIPlist`7D
X
X\noindent
Xthat`20would`20mean`20that`20the`20current`20cropping`20rectangle`20is`20114
V`20image`20pixels`20wide,
X77`20image`20pixels`20high,`20and`20its`20top-left`20corner`20is`20located`201
V19`20image`20pixels`20in
Xfrom`20the`20left`20edge`20of`20the`20image,`20and`2058`20image`20pixels`20in
V`20from`20the`20top`20edge.
XThese`20values`20will`20be`20updated`20as`20you`20drag`20the`20cropping`20rect
Vangle`20around.
X
XIf`20you`20want`20to`20set`20the`20size`20or`20position`20of`20the`20cropping
V`20rectangle
Xprecisely,`20you`20can`20use`20the`20arrow`20keys`20on`20your`20keyboard.`20
V`20First,`20make
Xthe`20%
X\it`20xv`20info`20\rm%
Xwindow`20visible`20as`20described`20above`20(if`20it's`20not`20already
Xvisible).`20`20Second,`20use`20the`20mouse`20to`20draw`20a`20rough`20approxima
Vtion`20of`20the
Xcropping`20rectangle`20that`20you`20want.`20`20You`20can`20now`20use`20the`20a
Vrrow`20keys`20to
Xmove`20the`20cropping`20rectangle`20around`20the`20image.`20`20Once`20you've
V`20gotten`20the
Xtop`20and`20left`20sides`20of`20the`20cropping`20rectangle`20precisely`20where
V`20you`20want
Xthem,`20you`20can`20move`20the`20bottom-right`20corner`20of`20the`20cropping
V`20rectangle
X(only)`20by`20holding`20the`20$<$shift$>$`20key`20down`20while`20using`20the
V`20arrow`20keys.
XPressing`20the`20up`20arrow`20will`20make`20the`20rectangle`20shorter,`20and
V`20pressing
Xthe`20down`20arrow`20will`20make`20the`20rectangle`20taller.
X
XOnce`20you`20have`20a`20cropping`20rectangle`20that`20you`20can`20live`20with,
V`20you`20can
Xproceed`20with`20the`20actual`20cropping`20operation.`20`20Click`20the`20%
X\bf`20Crop`20\rm%
Xbutton`20in
Xthe`20%
X\it`20xv`20controls`20\rm%
Xwindow,`20or`20type`20the`20'c'`20key`20in`20any`20open`20%
X`7B\it`20xv`7D
Xwindow.
XThe`20image`20window`20will`20shrink`20to`20show`20only`20portions`20of`20the
V`20image`20that
Xwere`20inside`20the`20cropping`20rectangle.
X
XNote:`20if`20you`20are`20running`20a`20window`20manager`20such`20as`20%
X\it`20mwm\rm%
X,
Xwhich`20decorates`20windows`20with`20a`20title`20bar,`20resizing`20regions,
V`20and
Xsuch,`20it`20is`20quite`20possible`20that`20the`20aspect`20ratio`20of`20the
V`20cropped`20image
Xwill`20get`20screwed`20up.`20`20This`20is`20because`20certain`20window`20manag
Vers`20enforce`20a
Xminimum`20window`20size.`20`20If`20you`20try`20to`20crop`20to`20a`20rectangle
V`20that`20is`20too
Xsmall,`20the`20window`20manager`20will`20create`20the`20smallest`20window`20it
V`20can,`20and
Xthe`20image`20will`20be`20stretched`20to`20fit`20this`20window.`20`20If`20this
V`20happens,`20you
Xcan`20press`20the`20%
X\bf`20Aspect`20\rm%
Xbutton`20in`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow,`20or`20type`20the
X'a'`20key`20in`20any`20open`20%
X`7B\it`20xv`7D
Xwindow.`20`20This`20will`20expand`20the`20image`20so`20that`20it
Xhas`20the`20correct`20aspect`20ratio`20again.
X
XYou`20can`20crop`20a`20cropped`20image`20by`20repeating`20the`20same`20steps
V`20(drawing`20a
Xnew`20cropping`20rectangle`20and`20issuing`20the`20%
X\bf`20Crop`20\rm%
Xcommand),`20ad`20infinitum.
X
XYou`20can`20return`20to`20the`20original,`20uncropped`20image`20by`20using`20t
Vhe`20%
X\bf`20UnCrop`20\rm%
Xcommand.`20`20Simply`20click`20the`20%
X\bf`20UnCrop`20\rm%
Xbutton`20or`20type`20the`20'u'`20key`20in`20any
Xopen`20%
X`7B\it`20xv`7D
Xwindow.`20`20Note`20that`20using`20the`20%
X\bf`20UnCrop`20\rm%
Xcommand`20will
Xturn`20off`20image`20smoothing`20(the`20%
X\bf`20Smooth\rm%
X)`20command),`20due`20to`20the`20potentially`20
Xlong`20time`20it`20can`20take`20to`20generate`20a`20large,`20smoothed`20image.
V
X
XNote`20that`20if`20you`20try`20to`20make`20the`20cropping`20rectangle`20too
V`20small`20in
Xeither`20width`20or`20height`20(under`205`20screen`20pixels),`20it'll`20just
V`20turn
Xitself`20off.`20`20If`20you`20want`20to`20crop`20a`20very`20small`20portion
V`20of`20an`20image,
Xyou'll`20probably`20have`20to`20do`20it`20in`20two`20passes.`20`20First,`20cro
Vp`20to`20a`20small
X(but`20large`20enough`20to`20still`20be`20enabled)`20rectangle,`20expand`20tha
Vt`20region,
Xthen`20crop`20again.
X
X\shead`7BSection`202.3:`20`20Zooming`7D
X
XYou`20can`20zoom`20in`20by`20a`20factor`20of`20two`20(or`20four,`20eight,`20
V`7B\it`20etc`7D.)`20on`20any`20
Xrectangular`20region`20of`20the`20image`20by`20holding`20down`20the`20$<$ctrl$
V>$`20key`20on`20your`20keyboard
Xand`20clicking`20the`20%
X\it`20Left`20\rm%
Xmouse`20button`20in`20the`20image.`20`20A`20rectangle`20will
Xflash,`20centered`20around`20the`20cursor`20position,`20and`20the`20region`20i
Vnside`20that
Xrectangle`20will`20be`20doubled`20in`20size.`20`20The`20image`20window`20shoul
Vd`20remain`20the
Xsame`20size,`20and`20in`20the`20same`20position.`20`20You`20can`20repeat`20thi
Vs`20operation`20to`20
Xzoom`20in`20by`20a`20factor`20of`20four,`20or`20eight,`20or`20whatever,`20as
V`20many`20times`20as`20you
Xwish.`20`20
X
XYou`20can`20zoom`20out`20by`20a`20factor`20of`20two`20(if`20possible)`20by`20h
Volding`20down
Xthe`20$<$ctrl$>$`20key`20on`20your`20keyboard`20and`20clicking`20the`20%
X\it`20Right`20\rm%
Xmouse
Xbutton`20inside`20the`20image`20window.`20`20You`20can`20not`20zoom`20out`20be
Vyond`20the`20point`20
Xwhere`20the`20entire`20image`20fill`20the`20window.
X
X\shead`7BSECTION`203:`09THE`20CONTROL`20WINDOW`7D
X
XThe`20%
X\it`20xv`20controls`20\rm%
Xwindow`20is`20the`20central`20point`20of`20control`20for`20the
Xprogram,`20hence`20the`20name.`20`20It`20provides`20controls`20to`20resize`20t
Vhe`20current
Ximage,`20flip`20and`20rotate`20it,`20load`20and`20save`20different`20files,
V`20and`20bring
Xup`20the`20other`20%
X`7B\it`20xv`7D
Xwindows.`20`20It`20can`20be`20brought`20up`20by`20clicking`20the`20
X%
X\it`20Right`20\rm%
Xmouse`20
Xbutton`20in`20the`20image`20window,`20or`20by`20typing`20the`20'?'`20key`20ins
Vide`20any
Xopen`20%
X`7B\it`20xv`7D
Xwindow.`20`20Doing`20either`20of`20these`20things`20while`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow`20is`20visible`20will`20hide`20it.
X
XAll`20of`20the`20following`20commands`20may`20be`20executed`20by`20either`20cl
Vicking`20the
Xappropriate`20command`20button,`20or`20typing`20the`20keyboard`20equivalent
V`20(where
Xgiven)`20into`20any`20open`20%
X`7B\it`20xv`7D
Xwindow.
X
X\shead`7BSection`203.1:`20`20Resizing`20Commands`7D
X
XNote`20that`20none`20of`20the`20'resizing'`20commands`20modify`20the`20image
V`20in`20any
Xway.`20`20They`20only`20affect`20how`20the`20image`20is`20displayed.`20`20The
V`20image`20remains
Xat`20its`20original`20size.`20`20This`20allows`20you`20to`20arbitrarily`20stre
Vtch`20and
Xcompact`20the`20image`20without`20compounding`20error`20caused`20by`20earlier
Xresizing.`20`20In`20each`20case,`20the`20displayed`20image`20is`20recomputed
V`20from`20the
Xoriginal`20internal`20image.
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Normal\rm%
X\`20\`20(Keyboard\`20equivalent\`20'n')`7D`7D
XAttempts`20to`20return`20the`20image`20to`20its`20normal`20size,
Xwhere`20one`20image`20pixel`20maps`20to`20one`20screen`20pixel.`20`20For`20exa
Vmple,`20if`20the
Ximage`20(or`20the`20current`20cropped`20portion`20of`20the`20image)`20has`20a
V`20size`20of
X320x200,`20this`20command`20will`20attempt`20to`20make`20the`20image`20window
V`20be`20320
Xscreen`20pixels`20wide`20by`20200`20screen`20pixels`20high.
X
XThis`20command`20may`20fail`20in`20two`20cases.`20`20If`20you're
Xrunning`20a`20window`20manager`20(such`20as`20%
X\it`20mwm\rm%
X)`20that`20enforces`20a`20minimum`20window
Xsize,`20and`20the`20'normal'`20size`20is`20too`20small,`20the`20image`20may
V`20get
Xdistorted.`20`20See`20the`20note`20in`20`60`60Section`202.2:`20Cropping''`20fo
Vr`20more
Xinformation.
X
XAlso,`20if`20the`20image`20is`20larger`20than`20the`20size`20of`20your
Xscreen,`20it`20will`20be`20'halved'`20until`20it`20fits`20on`20the`20screen.
V`20`20For
Xexample,`20if`20you`20try`20to`20display`20a`201400x900`20image`20on`20a`20128
V0x1024
Xscreen,`20the`20%
X\bf`20Normal`20\rm%
Xcommand`20will`20display`20a`20700x450`20image.
X
X\IPitem`7B`7B%
X\bf`20Max\`20Size\rm%
X\`20\`20(Keyboard\`20equivalent\`20'm')`7D`7D
XThis`20command`20will`20make`20the`20displayed`20image`20be
Xthe`20same`20size`20as`20the`20screen.`20`20If`20you`20are`20running`20a`20win
Vdow`20manager
Xthat`20puts`20up`20a`20titlebar,`20you'll`20find`20that`20the`20titlebar`20is
V`20now`20off`20the
Xtop`20of`20the`20screen.`20`20To`20get`20the`20titlebar`20back,`20simply`20shr
Vink`20the`20image
Xto`20anything`20smaller`20than`20the`20size`20of`20the`20screen.`20`20The`20wi
Vndow`20will`20be
Xmoved`20so`20that`20the`20titlebar`20is`20once`20again`20visible.
X
X\IPitem`7B`7B%
X\bf`20Maxpect\rm%
X\`20\`20(Keyboard\`20equivalent\`20'M')`7D`7D
XMakes`20the`20image`20as`20large`20as`20possible,`20while
Xpreserving`20the`20aspect`20ratio.`20`20This`20avoids`20the`20generally`20unwa
Vnted
Ximage`20distortion`20that`20%
X\bf`20Max`20Size`20\rm%
Xis`20capable`20of`20generating.`20`20For
Xexample,`20if`20you`20have`20a`20320x200`20image,`20and`20an`201280x1024`20scr
Veen,`20doing
Xthe`20%
X\bf`20Maxpect`20\rm%
Xcommand`20will`20result`20in`20an`20image`20that`20is`201280x800.`20`20%
X\bf`20Max
XSize\rm%
X,`20on`20the`20other`20hand,`20would've`20generated`20an`20image`20of`20size
X1280x1024,`20which`20would`20be`20appear`20'stretched'`20vertically.
X
X\IPitem`7B`7B%
X\bf`20Dbl\`20Size\rm%
X\`20\`20(Keyboard\`20equivalent\`20'$>$')`7D`7D
XDoubles`20the`20current`20size`20of`20the`20image,`20with`20the`20constraint
V`20that
Xneither`20axis`20is`20allowed`20to`20be`20larger`20than`20the`20screen.`20`20F
Vor`20example,
Xgiven`20a`20320x200`20image`20and`20a`201280x1024`20screen,`20the`20image`20ca
Vn`20be
Xdoubled`20once`20(to`20640x400),`20a`20second`20time`20(to`201280x800),`20but
V`20a`20third
Xtime`20would`20make`20the`20image`201280x1024.`20`20You'll`20note`20that`20on
V`20the`20third
Xtime,`20the`20width`20didn't`20change`20at`20all,`20since`20it`20was`20already
V`20at`20its
Xmaximum`20value.`20`20Also`20note`20that`20the`20height`20wasn't`20allowed`20t
Vo`20double
X(from`20800`20to`201600),`20but`20was`20truncated`20at`20its`20maximum`20value
V`20(1024).
X
X\IPitem`7B`7B%
X\bf`20Half\`20Size\rm%
X\`20\`20(Keyboard\`20equivalent\`20'$<$')`7D`7D
XHalves`20the`20current`20size`20of`20the`20image,`20with`20the`20constraint
V`20that
Xneither`20axis`20is`20allowed`20to`20have`20a`20size`20less`20than`201`20pixel
V.`20`20Also,`20you
Xmay`20run`20into`20'minimum`20size'`20problems`20with`20your`20window`20manage
Vr.`20`20See
Xthe`20note`20in`20`60`60Section`202.2:`20Cropping''`20for`20more`20information
V.
X
XNote`20that`20the`20window`20size`20is`20maintained`20as`20a`20pair`20of`20int
Vegers.`20`20As`20a
Xresult`20you`20may`20see`20some`20integer`20round-off`20problems.`20`20For`20e
Vxample,`20if
Xyou`20halve`20a`20265x185`20image,`20you'll`20get`20a`20132x92`20image,`20whic
Vh`20is`20just
Xfine.`20`20However,`20if`20you`20%
X\bf`20Dbl`20Size`20\rm%
Xthis`20image,`20you'll`20get`20a`20264x184
Ximage,`20not`20the`20265x185`20image`20you`20might`20have`20expected.
X
X\IPitem`7B`7B%
X\bf`20+10\%\rm%
X\`20\`20(Keyboard\`20equivalent\`20'.')`7D`7D
XIncreases`20the`20current`20size`20of`20the`20image`20by`2010\%,`20subject`20t
Vo
Xthe`20constraint`20that`20the`20image`20cannot`20be`20made`20larger`20than`20t
Vhe`20screen
Xsize`20(in`20either`20axis).`20`20For`20example,`20issuing`20this`20command
V`20on`20a
X320x200`20image`20will`20result`20in`20a`20352x220`20image.
X
X\IPitem`7B`7B%
X\bf`20--10\%\rm%
X\`20\`20(Keyboard\`20equivalent\`20',')`7D`7D
XDecreases`20the`20current`20size`20of`20the`20image`20by`2010\%.`20`20Neither
V`20axis`20of`20the
Ximage`20is`20allowed`20to`20shrink`20below`201`20pixel.`20`20Also,`20you`20run
V`20the`20risk`20of
Xrunning`20into`20'minimum`20window`20size'`20problems`20with`20your`20window
V`20manager.
X
XIt`20should`20be`20noted`20that`20the`20%
X\bf`20+10\%`20\rm%
Xand`20%
X\bf`20--10\%`20\rm%
Xcommands`20have`20no
Xconcept`20of`20an`20'original`20size'.`20`20They`20simply`20increase`20or`20de
Vcrease`20the
Xcurrent`20image`20size`20by`2010\%.`20`20As`20a`20result,`20they`20do`20not
V`20undo`20each`20other.
XFor`20example,`20take`20a`20320x200`20image.`20`20Do`20a`20%
X\bf`20+10\%`20\rm%
Xand`20the`20image`20will`20be
X352x220.`20`20If`20you`20issue`20the`20%
X\bf`20--10\%`20\rm%
Xcommand`20now,`20the`20image`20will`20be`20made
X(352`20--`2035.2)x(220`20--`2022),`20or`20316x198.
X
X\IPitem`7B`7B%
X\bf`204x3\rm%
X\`20\`20(Keyboard\`20equivalent\`20'4')`7D`7D
XAttempts`20to`20resize`20the`20image`20so`20that`20the`20ratio`20of`20width
V`20to
Xheight`20is`20equal`20to`204`20to`203.`20`20(`7B\it`20e.g.`7D,`20320x240,`2040
V0x300,`20`7B\it`20etc`7D.)`20`20This`20is
Xuseful`20because`20many`20images`20were`20meant`20to`20fill`20the`20screen`20o
Vf`20whatever
Xsystem`20they`20were`20generated`20on,`20and`20nearly`20all`20video`20tubes
V`20have`20an`20aspect
Xratio`20of`204:3.`20`20This`20command`20will`20stretch`20the`20image`20so`20th
Vat`20things
Xwill`20probably`20look`20right`20on`20your`20X`20display`20(nearly`20all`20of
V`20which,
Xthankfully,`20have`20square`20pixels).`20`20This`20command`20is`20particularly
V`20useful
Xfor`20images`20which`20have`20really`20bizarre`20sizes`20(such`20as`20the`2060
V0x200
Ximages`20presumably`20meant`20for`20CGA,`20and`20the`20640x350`2016--color`20E
VGA
Ximages).
X
X\IPitem`7B`7B%
X\bf`20Aspect\rm%
X\`20\`20(Keyboard\`20equivalent\`20'a')`7D`7D
XApplies`20the`20'default`20aspect`20ratio'`20to`20the`20image.`20`20This`20is
V`20done
Xautomatically`20when`20the`20image`20is`20first`20loaded.`20`20Normally,`20the
V`20default
Xaspect`20ratio`20is`20'1:1',`20but`20certain`20GIF`20files`20may`20have`20an
V`20aspect`20ratio
Xencoded`20in`20them.`20`20You`20can`20also`20set`20the`20default`20aspect`20ra
Vtio`20via`20a
Xcommand-line`20argument`20or`20an`20X`20resource.`20`20See`20'Section`209:`20M
Vodifying`20XV
XBehavior'`20for`20more`20info.`20`20The`20idea`20behind`20this`20command`20is
V`20that`20you'd
Xstretch`20the`20image`20manually`20(via`20your`20window`20manager)`20to`20roug
Vhly`20the
Xsize`20you'd`20like,`20and`20then`20use`20the`20Aspect`20command`20to`20fix
V`20up`20the
Xproportions.
X
XNormally`20%
X\bf`20Aspect`20\rm%
Xexpands`20one`20axis`20of`20the`20image`20to`20correct`20the`20aspect
Xratio.`20`20If`20this`20would`20result`20in`20an`20image`20that`20is`20larger
V`20than`20the
Xscreen,`20the`20%
X\bf`20Aspect`20\rm%
Xcommand`20will`20instead`20shrink`20one`20of`20the`20axes`20to
Xcorrect`20the`20aspect`20ratio.
X
X\end`7BIPlist`7D
X
X\shead`7BSection`203.2:`20`20Rotate/Flip`20Commands`7D
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Turn\`20CW\rm%
X\`20\`20(Keyboard\`20equivalent\`20't')`7D`7D
XRotates`20the`20image`2090`20degrees`20clockwise.
X
X\IPitem`7B`7B%
X\bf`20Turn\`20CCW\rm%
X\`20\`20(Keyboard\`20equivalent\`20'T')`7D`7D
XRotates`20the`20image`2090`20degrees`20counter-clockwise.
X
X\IPitem`7B`7B%
X\bf`20Flip\`20H\rm%
X\`20\`20(Keyboard\`20equivalent\`20'h')`7D`7D
XFlips`20the`20image`20horizontally`20(around`20the`20vertical`20center-line
V`20of`20the`20image).
X
X\IPitem`7B`7B%
X\bf`20Flip\`20V\rm%
X\`20\`20(Keyboard\`20equivalent\`20'v')`7D`7D
XFlips`20the`20image`20vertically`20(around`20the`20horizontal`20center-line
V`20of`20the`20image).
X
X\end`7BIPlist`7D
X
X\shead`7BSection`203.3:`20`20Smoothing`20Commands`7D
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Raw\rm%
X\`20\`20(Keyboard\`20equivalent\`20'r')`7D`7D
XReturns`20the`20displayed`20image`20to`20its`20'raw'`20state`20(where`20each
V`20pixel`20in
Xthe`20displayed`20image`20is`20as`20close`20as`20possible`20to`20the`20corresp
Vonding
Xpixel`20in`20the`20internal`20image).`20`20In`20short,`20it`20turns`20off`20an
Vy`20dithering
Xor`20smoothing.`20`20When`20dithering`20or`20smoothing`20haven't`20been`20done
V,`20this
Xcommand`20is`20disabled.
X
X\IPitem`7B`7B%
X\bf`20Dither\rm%
X\`20\`20(Keyboard\`20equivalent\`20'd')`7D`7D
XRegenerates`20the`20displayed`20image`20by`20dithering`20with`20the`20availabl
Ve
Xcolors`20in`20an`20attempt`20to`20approximate`20the`20original`20image.`20`20T
Vhis`20is`20only
Xrelevant`20if`20the`20color`20allocation`20code`20failed`20to`20get`20all`20th
Ve`20colors`20it
Xwanted.`20`20If`20it`20did`20get`20all`20the`20desired`20colors,`20the`20%
X\bf`20Dither`20\rm%
Xcommand
Xwill`20just`20generate`20the`20same`20display`20image`20as`20the`20%
X\bf`20Raw`20\rm%
Xcommand.`20`20On`20the
Xother`20hand,`20if`20you`20didn't`20get`20all`20the`20desired`20colors,`20the
V`20%
X\bf`20Dither`20\rm%
Xcommand`20will`20try`20to`20approximate`20the`20missing`20colors`20by`20dither
Ving`20with
Xthe`20colors`20that`20were`20obtained.`20`20If`20you're`20running`20%
X`7B\it`20xv`7D
Xon`20a`201--bit
Xdisplay`20the`20%
X\bf`20Dither`20\rm%
Xcommand`20will`20be`20disabled,`20as`20the`20image`20will`20always
Xbe`20dithered`20for`20display.
X
X\IPitem`7B`7B%
X\bf`20Smooth\rm%
X\`20\`20(Keyboard\`20equivalent\`20's')`7D`7D
XSmooths`20out`20distortion`20caused`20by`20integer`20round-off`20when`20an`20i
Vmage`20is
Xexpanded`20or`20shrunk.`20`20This`20is`20generally`20a`20desirable`20effect,
V`20however`20it
Xis`20fairly`20time-consuming`20on`20large`20images`20on`20most`20current
Xworkstations.`20`20As`20such,`20by`20default,`20it`20is`20not`20done`20automat
Vically.
XSee`20`60`60Section`209:`20Modifying`20XV`20Behavior''`20for`20more`20details.
V
X
X\end`7BIPlist`7D
X
X\shead`7BSection`203.4:`20`20Cropping`20Commands`7D
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Crop\rm%
X\`20\`20(Keyboard\`20equivalent\`20'c')`7D`7D
XCrops`20the`20image`20to`20the`20current`20cropping`20rectangle.`20`20This`20c
Vommand`20is
Xonly`20available`20when`20a`20cropping`20rectangle`20has`20been`20drawn`20on
V`20the`20image.
XSee`20`60`60Section`202.2:`20Cropping''`20for`20further`20information.
X
X\IPitem`7B`7B%
X\bf`20UnCrop\rm%
X\`20\`20(Keyboard\`20equivalent\`20'u')`7D`7D
XReturns`20the`20image`20to`20its`20normal,`20uncropped`20state.`20`20This`20co
Vmmand`20is
Xonly`20available`20after`20the`20image`20has`20been`20cropped.`20`20See`20`60
V`60Section`202.2:
XCropping''`20for`20further`20information.
X
X\IPitem`7B`7B%
X\bf`20AutoCrop\rm%
X\`20\`20(Keyboard\`20equivalent\`20'A')`7D`7D
XCrops`20off`20any`20constant`20borders`20that`20exist`20in`20the`20image.`20
V`20It`20will`20crop
Xto`20the`20smallest`20rectangle`20that`20encloses`20the`20'interesting'`20sect
Vion`20of
Xthe`20image.`20`20It`20may`20not`20always`20appear`20to`20work`20because`20of
V`20minor
Xinvisible`20color`20changes`20in`20the`20image.`20`20As`20such,`20it`20works
V`20best`20on
Xcomputer-generated`20images,`20and`20not`20as`20well`20on`20scanned`20images.
X
X\end`7BIPlist`7D
X
X\shead`7BSection`203.5:`20`20The`20Display`20Modes`20Menu`7D
X
XIn`20addition`20to`20displaying`20an`20image`20in`20a`20window,`20%
X`7B\it`20xv`7D
Xcan`20also
Xdisplay`20images`20on`20the`20root`20(background)`20window`20of`20your`20X`20d
Visplay.
XThere`20are`20a`20variety`20of`20ways`20that`20%
X`7B\it`20xv`7D
Xcan`20display`20an`20image`20on`20the
Xroot`20window.`20`20The`20%
X\bf`20Display`20Modes`20\rm%
Xpopup`20menu`20lets`20you`20select`20
Xwhere`20(and`20how)`20%
X`7B\it`20xv`7D
Xwill`20display`20the`20image.
X
XClick`20on`20the`20%
X\bf`20Display`20Modes`20\rm%
Xbutton`20in`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow,`20and`20hold`20the`20mouse`20button`20down.`20`20This`20will`20cause
V`20the`20%
X\bf`20Display
XModes`20\rm%
Xmenu`20to`20pop`20up.`20`20The`20current`20display`20mode`20will`20be`20shown
V`20with`20a
Xcheck`20mark`20next`20to`20it.`20`20To`20select`20a`20new`20mode,`20drag`20the
V`20mouse`20down`20to
Xthe`20desired`20mode,`20and`20release`20the`20mouse`20button.
X
XIt`20is`20not`20possible`20for`20%
X`7B\it`20xv`7D
Xto`20receive`20button`20presses`20or`20keyboard
Xpresses`20in`20the`20root`20window.`20`20As`20such,`20there`20are`20several
V`20functions
Xthat`20cannot`20be`20used`20while`20in`20a`20'root'`20mode,`20such`20as`20pixe
Vl`20tracking
Xand`20image`20cropping.`20`20If`20you`20want`20to`20do`20such`20things,`20you'
Vll`20have`20to
Xtemporarily`20return`20to`20'window'`20mode,`20and`20return`20to`20'root'`20mo
Vde`20when
Xyou're`20finished.`20`20Also,`20when`20you`20are`20in`20a`20'root'`20mode,`20y
Vou`20will`20not
Xbe`20able`20to`20get`20rid`20of`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow.`20`20At`20best`20you`20can
Xiconify`20it`20(using`20your`20window`20manager).`20`20(The`20reason`20for`20t
Vhis`20is`20that
Xif`20you`20ever`20got`20rid`20of`20it`20there'd`20be`20no`20way`20to`20get`20i
Vt`20back.)
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Window\rm%
X`7D`7D
XDisplays`20the`20image`20in`20a`20window.`20`20If`20you`20were`20previously
V`20in`20a`20'root'
Xmode,`20the`20root`20window`20will`20also`20be`20cleared.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Tiled\rm%
X`7D`7D
XThe`20image`20is`20displayed`20in`20the`20root`20window.`20`20One`20image`20is
V
Xdisplayed`20aligned`20with`20the`20top-left`20corner`20of`20the`20screen.`20
V`20The`20image
Xis`20then`20duplicated`20towards`20the`20bottom`20and`20right`20edges`20of`20t
Vhe`20screen,
Xas`20many`20times`20as`20necessary`20to`20fill`20the`20screen.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Integer\`20Tiled\rm%
X`7D`7D
Xthat`20the`20image`20is`20first`20shrunk`20so`20that`20its`20width`20and`20hei
Vght`20are
Xinteger`20divisors`20of`20the`20screen's`20width`20and`20height.`20`20This`20k
Veeps`20the
Ximages`20along`20the`20bottom`20and`20right`20edges`20of`20the`20screen`20from
V`20being
X'chopped-off'.`20`20Note:`20using`20any`20of`20the`20'resizing'`20commands`20(
Vsuch`20as
X%
X\bf`20Normal\rm%
X,`20%
X\bf`20Dbl`20Size\rm%
X,`20`7B\it`20etc`7D.)`20will`20lose`20the`20'integer'-ness`20of
Xthe`20image.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Mirrored\rm%
X`7D`7D
XTiles`20the`20original`20image`20with`20versions`20that`20have`20been
Xhorizontally`20flipped,`20vertically`20flipped,`20and`20both`20horizontally
V`20and
Xvertically`20flipped.`20`20This`20gets`20rid`20of`20the`20sharp`20dividing`20l
Vines`20where
Xtiled`20images`20meet.`20`20The`20effect`20is`20quite`20interesting.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Integer\`20Mirrored\rm%
X`7D`7D
XLike`20%
X\bf`20Root:`20Mirrored\rm%
X,`20but`20also`20does`20the`20integer-ization`20described
Xunder`20the`20%
X\bf`20Root:`20Integer`20Tiled`20\rm%
Xentry.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Center\`20Tiled\rm%
X`7D`7D
XLike`20%
X\bf`20Root:`20Tiled\rm%
X,`20but`20it`20positions`20the`20images`20so`20that`20one`20of`20them`20is
Xcentered`20on`20the`20screen,`20and`20the`20rest`20are`20tiled`20off`20in`20al
Vl`20directions.
XVisually`20pleasing`20without`20the`20image`20size`20distortion`20associated
V`20with
X%
X\bf`20Root:`20Integer`20Tiled\rm%
X.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Centered\rm%
X`7D`7D
XDisplays`20a`20single`20image`20centered`20in`20the`20root`20window,`20surroun
Vded`20by`20black.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Centered,\`20Warp\rm%
X`7D`7D
XDisplays`20a`20single`20image`20centered`20in`20the`20root`20window,`20surroun
Vded`20by`20a
Xblack`20and`20white`20'warp'`20pattern,`20which`20produces`20some`20mildly`20v
Visually
Xpleasing`20Moire`20effects.
X
X\IPitem`7B`7B%
X\bf`20Root:\`20Centered,\`20Brick\rm%
X`7D`7D
XDisplays`20a`20single`20image`20centered`20in`20the`20root`20window,`20surroun
Vded`20by`20a
Xblack`20and`20white`20'brick'`20pattern.
X
X\end`7BIPlist`7D
X
X\noindent
XNote:`20The`20three`20'centered'`20modes`20(%
X\bf`20Root:`20Centered\rm%
X,`20%
X\bf`20Root:
XCentered,`20Warp\rm%
X,`20and`20%
X\bf`20Root:`20Centered,`20Brick\rm%
X,`20but`20not`20%
X\bf`20Root:
XCenter`20Tiled\rm%
X)`20require`20the`20creation`20of`20a`20Pixmap`20the`20size`20of`20the
Xscreen.`20`20This`20can`20be`20a`20fairly`20large`20request`20for`20resources,
V`20and`20will
Xfail`20on`20a`20color`20X`20terminal`20with`20insufficient`20memory.`20`20They
V`20can`20also
Xrequire`20the`20transmission`20of`20considerably`20more`20data`20than`20the
V`20other
X'root'`20modes.`20`20If`20you're`20on`20a`20brain-damaged`20X`20terminal`20han
Vging`20off`20a
Xslow`20network,`20you`20should`20probably`20go`20somewhere`20else.`20`20Barrin
Vg`20that,
Xyou`20should`20certainly`20avoid`20the`20'centered'`20modes.
X
XAlso`20note:`20If`20you`20quit`20%
X`7B\it`20xv`7D
Xwhile`20displaying`20an`20image`20on`20the`20root
Xwindow,`20the`20image`20will`20remain`20in`20the`20root`20window,`20and`20the
V`20colors`20used
Xby`20the`20image`20will`20remain`20allocated.`20`20This`20is`20generally`20reg
Varded`20as
Xcorrect`20behavior.`20`20If`20you`20decide`20you`20want`20to`20get`20rid`20of
V`20the`20root`20image
Xto`20free`20up`20resources,`20or`20simply`20because`20you're`20sick`20of`20see
Ving`20it,`20the
Xquickest`20route`20is`20to`20use`20run`20'xv`20--clear',`20which`20will`20clea
Vr`20the`20root
Xwindow,`20release`20any`20allocated`20colors,`20and`20exit.`20`20Alternately,
V`20%
X\it`20xsetroot`20\rm%
Xand`20any`20other`20X`20program`20that`20puts`20things`20in`20the`20root`20win
Vdow`20should`20be
Xable`20to`20do`20the`20trick`20as`20well.
X
X\shead`7BSection`203.6:`20`20The`2024--bit`20Conversion`20Menu`7D
X
X%
X`7B\it`20xv`7D
Xcan`20currently`20only`20operate`20on`208--bit`20images.`20`20Whenever`20you
V`20load`20a
X24--bit`20image`20(such`20as`20JPEG,`20TIFF,`20PPM,`20`7B\it`20etc.`7D)`20it
V`20is`20immediately`20converted
Xinto`20an`208--bit`20colormapped`20image`20using`20one`20of`20three`20algorith
Vms.
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Fast\rm%
X`7D`7D
XConverts`2024--bit`20images`20into`208--bit`20images`20by`20dithering`20with
V`20a`20fixed`206x6x6
XRGB`20colormap.`20`20It`20is`20the`20quickest`20of`20the`20three`20algorithms,
V`20but`20also`20generally
Xproduces`20the`20worst`20images.`20`20It`20can`20also`20be`20selected`20via
V`20the`20'--quick24'
Xcommand-line`20option`20or`20X`20resource.
X
X\IPitem`7B`7B%
X\bf`20Slow\rm%
X`7D`7D
XThe`20default`20algorithm.`20`20Takes`20about`20twice`20as`20long`20as`20the
V`20fast`20algorithm.`20`20
XUses`20the`20median-cut`20algorithm`20to`20pick`20a`20set`20of`20256`20colors,
V`20and`20then`20dithers
Xusing`20these`20colors.`20`20It`20can`20be`20selected`20via`20the`20'--slow24'
V`20command-line
Xoption`20or`20X`20resource.
X
X\IPitem`7B`7B%
X\bf`20Best\rm%
X`7D`7D
XBy`20far`20and`20away`20the`20slowest`20of`20the`20algorithms.`20`20It`20can
V`20take`20up`20to`20ten`20times
Xas`20long`20as`20the`20'slow'`20algorithm.`20`20It`20uses`20a`20cleverer`20ver
Vsion`20of`20the
Xmedian-cut`20algorithm`20to`20pick`20a`20better`20set`20of`20colors`20than`20t
Vhe`20slow
Xalgorithm.`20`20It`20does`20%
X\bf`20not`20\rm%
Xdither.`20`20This`20might`20look`20best`20if`20you're
Xgoing`20to`20be`20expanding`20the`20image`20by`20very`20much,`20as`20the`20dit
Vhering`20in`20the
Xother`20two`20algorithms`20becomes`20very`20noticable.`20`20You`20can`20also
V`20select`20this
Xoption`20via`20the`20'--best24'`20command-line`20option`20or`20X`20resource.
X
X\end`7BIPlist`7D
X
X\shead`7BSection`203.7:`20`20Working`20With`20Multiple`20Files`7D
X
X%
X`7B\it`20xv`7D
Xprovides`20a`20a`20set`20of`20controls`20that`20let`20you`20conveniently`20ope
Vrate`20on
Xa`20list`20of`20images.`20`20To`20use`20the`20following`20commands,`20you'll
V`20have`20to
Xstart`20up`20%
X`7B\it`20xv`7D
Xwith`20a`20list`20of`20filenames.`20`20For`20example,`20you`20could`20type
X'xv`20*.gif'`20(assuming,`20of`20course,`20that`20you`20have`20a`20bunch`20of
V`20files`20that
Xend`20with`20the`20suffix`20'.gif'`20in`20the`20current`20directory).
X
XThe`20filenames`20are`20listed`20in`20a`20scrollable`20window.`20`20The`20curr
Vent
Xselection`20is`20shown`20in`20reverse`20video.`20`20If`20there`20are`20more
V`20names`20than
Xwill`20fit`20in`20the`20window,`20the`20scrollbar`20will`20be`20enabled.
X
X\shead`7BSection`203.7.1:`20`20Operating`20a`20List`20Window`7D
X
XThe`20scrollbar`20operates`20as`20follows:`20`20
X\begin`7BTPlist`7D`7B$\bullet$`7D
X\item`5B`7B$\bullet$`7D`5D
Xclicking`20in`20the`20top`20or`20bottom`20arrow`20of`20the`20scrollbar`20scrol
Vls`20the`20list
Xby`20one`20line`20in`20the`20appropriate`20direction.`20`20It`20will`20continu
Ve`20to`20scroll
Xthe`20list`20as`20long`20as`20you`20hold`20the`20mouse`20down.
X\item`5B`7B$\bullet$`7D`5D
XThe`20thumb`20(the`20small`20white`20rectangle`20in`20the`20middle`20of`20the
V`20scrollbar)
Xshows`20roughly`20where`20in`20the`20list`20you`20are.`20`20You`20can`20change
V`20your
Xposition`20in`20the`20list`20by`20clicking`20and`20dragging`20the`20thumb`20to
V`20another
Xposition`20in`20the`20scrollbar.`20`20The`20list`20will`20scroll`20around`20as
V`20you`20move`20the
Xthumb.
X\item`5B`7B$\bullet$`7D`5D
XYou`20can`20scroll`20the`20list`20up`20or`20down`20a`20page`20at`20a`20time
V`20by`20clicking`20in
Xthe`20grey`20region`20between`20the`20thumb`20and`20the`20top`20or`20bottom
V`20arrows.
X\end`7BTPlist`7D
X
X\noindent
XIf`20you`20click`20on`20a`20name`20in`20the`20list,`20that`20name`20will`20bec
Vome
Xhighlighted.`20`20You`20can`20drag`20the`20highlight`20bar`20up`20and`20down,
V`20and`20the
Xlist`20will`20scroll`20appropriately.
X
XIt`20is`20also`20possible`20to`20control`20the`20list`20window`20from`20the
V`20keyboard.`20`20In
Xall`20cases,`20you`20must`20make`20sure`20that`20the`20window`20sees`20the`20k
Veypress.
XGenerally,`20this`20means`20you`20have`20to`20have`20the`20cursor`20inside`20t
Vhe`20window,
Xthough`20your`20window`20manager`20may`20also`20require`20you`20to`20click`20i
Vnside`20the
Xwindow`20first.
X\begin`7BTPlist`7D`7B$\bullet$`7D
X\item`5B`7B$\bullet$`7D`5D
XThe`20up`20and`20down`20arrow`20keys`20move`20the`20highlight`20bar`20up`20and
V`20down.`20`20If
Xthe`20bar`20is`20at`20the`20top`20or`20bottom`20of`20the`20window,`20the`20lis
Vt`20will`20scroll
Xone`20line.
X\item`5B`7B$\bullet$`7D`5D
XThe`20page`20up`20and`20page`20down`20keys`20scroll`20the`20list`20up`20or`20d
Vown`20a`20page`20at`20a`20time.
X\item`5B`7B$\bullet$`7D`5D
XPressing`20the`20home`20key`20will`20jump`20to`20the`20beginning`20of`20the
V`20list.
XPressing`20the`20end`20key`20will`20jump`20to`20the`20bottom`20of`20the`20list
V.
X
X\end`7BTPlist`7D
X
X\shead`7BSection`203.7.2:`20`20The`20File`20Commands`7D
X
XYou`20can`20directly`20view`20any`20image`20in`20the`20list`20by`20double-clic
Vking`20on`20its
Xfilename.`20`20If`20%
X`7B\it`20xv`7D
Xis`20unable`20to`20load`20the`20file`20(for`20any`20of`20a`20variety`20of
Xreasons),`20it'll`20display`20an`20error`20message`20and`20put`20up`20the`20de
Vfault
Ximage,`20the`20%
X`7B\it`20xv`7D
Xlogo.
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Next\rm%
X\`20\`20(Keyboard\`20equivalent\`20$<$space$>$)`7D`7D
XAttempts`20to`20load`20the`20next`20file`20in`20the`20list.`20`20If`20it`20is
V`20unable
Xto`20load`20the`20next`20file,`20it`20will`20continue`20down`20the`20list`20un
Vtil`20it
Xsuccessfully`20loads`20a`20file.`20`20If`20it`20gets`20to`20the`20bottom`20of
V`20the`20list
Xwithout`20successfully`20loading`20a`20file,`20it`20will`20put`20up`20the`20de
Vfault
Ximage.
X
X\IPitem`7B`7B%
X\bf`20Previous\rm%
X\`20\`20(Keyboard\`20equivalent\`20$<$backspace$>$)`7D`7D
XAttempts`20to`20load`20the`20previous`20file`20in`20the`20list.`20`20If`20it
V`20is`20unable`20to
Xload`20the`20previous`20file,`20it`20will`20continue`20up`20the`20list`20until
V`20it
Xsuccessfully`20loads`20a`20file.`20`20If`20it`20gets`20to`20the`20top`20of`20t
Vhe`20list`20without
Xsuccessfully`20loading`20a`20file,`20it`20will`20put`20up`20the`20default`20im
Vage.
X
X\IPitem`7B`7B%
X\bf`20Delete\rm%
X\`20\`20(Keyboard\`20equivalent\`20$<$ctrl-D$>$)`7D`7D
XThis`20command`20lets`20delete`20the`20currently`20selected`20file`20from`20th
Ve`20list
X(and`20optionally`20delete`20the`20associated`20disk`20file).`20`20Note`20that
V`20the
Xcurrently`20selected`20file`20is`20the`20one`20with`20the`20highlight`20bar
V`20on`20it.
XWhile`20this`20is`20generally`20the`20same`20as`20the`20currently`20displayed
V`20image,`20it
Xdoesn't`20have`20to`20be.
X
XThe`20%
X\bf`20Delete`20\rm%
Xcommand`20will`20pop-up`20a`20window`20asking`20you`20what`20you`20want`20to
Xdelete.`20`20Your`20choices`20are:
X\ind`7B1\parindent`7D\begin`7BTPlist`7D`7B$\bullet$`7D
X\item`5B`7B$\bullet$`7D`5D
X%
X\bf`20List`20Entry\rm%
X,`20which`20will`20remove`20the`20highlighted`20name`20from`20the`20list.
X(Keyboard`20equivalent:`20the`20enter`20key)
X\item`5B`7B$\bullet$`7D`5D
X%
X\bf`20Disk`20File\rm%
X,`20which`20will`20remove`20the`20highlighted`20name`20from`20the`20list`20and
V
Xalso`20delete`20the`20associated`20disk`20file.`20`20This`20removes`20unwanted
V`20images,
Xjust`20like`20manually`20typing`20'rm`20$<$filename$>$'`20in`20another`20windo
Vw.
X(Keyboard`20equivalent:`20$<$ctrl-D$>$)
X\item`5B`7B$\bullet$`7D`5D
X%
X\bf`20Cancel\rm%
X,`20which`20lets`20you`20get`20out`20of`20the`20Delete`20command`20without`20a
Vctually
Xdeleting`20anything.`20`20(Keyboard`20equivalent:`20the`20esc`20key)
X\ind`7B1\parindent`7D
X\end`7BTPlist`7D%
X\end`7BIPlist`7D
X
X\shead`7BSection`203.7.3:`20`20Image`20Reloading`7D
XIt`20is`20occasionally`20desirable`20to`20reload`20an`20image`20file`20because
V`20the
Xcontents`20of`20the`20file`20have`20changed.`20`20For`20example,`20you`20could
V`20be
Xdownloading`20a`20file,`20and`20you`20might`20want`20to`20keep`20reloading`20t
Vhe`20file`20to
Xcheck`20on`20the`20progress`20of`20the`20download.`20`20Or`20perhaps`20you`20h
Vave`20a`20program
Xthat`20generates`20images,`20and`20you'd`20like`20to`20view`20these`20images
V`20without`20any
Xmanual`20intervention.
X
X%
X`7B\it`20xv`7D
Xprovides`20a`20way`20to`20reload`20an`20image`20via`20an`20external`20signal.
V`20`20If
Xyou`20send`20the`20xv`20process`20a`20SIGQUIT`20signal`20('kill`20--QUIT`20%
X\it`20pid\rm%
X',`20or
X'kill`20--3`20%
X\it`20pid\rm%
X'`20on`20most`20systems),`20the`20program`20will`20reload`20the
Xcurrently`20selected`20file.`20`20(The`20one`20that`20is`20currently`20highlig
Vhted`20in
Xthe`20%
X\it`20xv`20controls`20\rm%
Xwindow`20filename`20list.)`20`20This`20behavior`20is`20exactly
Xthe`20same`20as`20hitting`20'$<$return$>$'`20in`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow.`20`20If
X%
X`7B\it`20xv`7D
Xis`20currently`20in`20a`20state`20where`20hitting`20'$<$return$>$'`20in`20the
Xcontrols`20window`20won't`20load`20an`20image`20(`7B\it`20i.e.`7D,`20some`20po
Vp-up`20dialog`20box`20is
Xgrabbing`20all`20such`20events),`20then`20sending`20this`20signal`20won't`20wo
Vrk`20either.
X
XAn`20idea:`20You`20could`20write`20a`20'clock'`20program`20that,`20once`20a
V`20minute,
Xgenerates`20a`20really`20spiffy`20looking`20picture`20of`20the`20current`20tim
Ve`20(with
Xcolor`20gradations,`203d`20extruded`20numbers,`20whatever),`20then`20sends`20%
V
X`7B\it`20xv`7D
Xthe
Xsignal`20to`20reload`20the`20generated`20image.
X
X\shead`7BSection`203.8:`20`20The`20Grab`20Command`7D
X
XThe`20%
X\bf`20Grab`20\rm%
Xcommand`20works`20as`20follows:`20`20click`20on`20the`20%
X\bf`20Grab`20\rm%
Xbutton
Xin`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow,`20or`20type`20a`20$<$ctrl-G$>$`20key`20in`20any`20active
X%
X`7B\it`20xv`7D
Xwindow`20(except`20for`20the`20JPEG,`20PostScript,`20and`20TIFF`20'save'`20
Xdialog`20boxes).`20`20The`20terminal`20will`20beep`20once,`20and`20the`20curso
Vr`20will`20change`20
Xto`20a`20cross.`20`20The`20screen`20will`20remain`20frozen`20until`20you`20com
Vplete`20the`20%
X\bf`20Grab`20\rm%
Xcommand.
X
XYou`20can`20%
X\bf`20Grab`20\rm%
Xan`20arbitrary`20region`20of`20the`20screen`20by`20clicking`20the`20
X%
X\it`20Left`20\rm%
Xmouse`20button`20and`20dragging`20a`20rectangle`20in`20exactly`20the`20same
Xway`20you`20draw`20a`20cropping`20rectangle.`20`20When`20you`20let`20go`20of
V`20the`20mouse
Xbutton,`20the`20contents`20of`20this`20rectangle`20will`20be`20read`20from`20t
Vhe
Xscreen`20and`20loaded`20into`20%
X\it`20xv\rm%
X.`20`20
X
XAlternately,`20you`20can`20grab`20the`20entire`20contents`20of`20a`20window
V`20(including`20its`20
Xframe)`20by`20clicking`20the`20%
X\it`20Middle`20\rm%
Xmouse`20button`20anywhere`20inside`20the`20chosen
Xwindow.`20`20If`20you`20click`20the`20%
X\it`20Middle`20\rm%
Xmouse`20button`20somewhere`20on`20the`20root`20
Xwindow,`20the`20entire`20screen`20will`20be`20loaded`20into`20%
X\it`20xv\rm%
X.
X
XOr,`20alternately,`20you`20can`20simply`20abort`20the`20%
X\bf`20Grab`20\rm%
Xcommand`20by`20
Xclicking`20the`20%
X\it`20Right`20\rm%
Xmouse`20button`20anywhere`20on`20the`20screen.
X
XYou`20can`20use`20the`20%
X\bf`20Grab`20\rm%
Xcommand`20for`20a`20wide`20variety`20of`20purposes.`20`20For`20
Xexample,`20you`20can`20use`20it`20to`20print`20the`20contents`20of`20any`20win
Vdow`20(or`20the
Xwhole`20screen)`20by`20grabbing`20the`20appropriate`20image`20and`20then`20sav
Ving`20it`20as
Xa`20PostScript`20file.`20`20
X
XYou`20can`20use`20the`20%
X\bf`20Grab`20\rm%
Xcommand,`20in`20conjunction`20with
Xthe`20Zoom`20and`20UnZoom`20commands,`20as`20an`20effective`20replacement`20fo
Vr`20the`20%
X\it`20xmag`20\rm%
Xprogram.`20`20
X
XYou`20can`20also`20use`20the`20%
X\bf`20Grab`20\rm%
Xcommand`20to`20pick`20'just`20the`20right`20colors'
Xfor`20any`20application.`20`20Simply`20start`20the`20application`20in`20questi
Von,`20%
X\bf`20Grab`20\rm%
Xthe`20window`20into`20%
X\it`20xv\rm%
X,`20and`20use`20the`20colormap`20editor`20to`20twiddle`20the`20colors
Xaround`20to`20your`20heart's`20content.
X
XNote:`20`20The`20%
X\bf`20Grab`20\rm%
Xcommand`20does`20not`20work`20on`20Macintoshes`20running`20%
X\it`20MacX`20\rm%
Xin`20a`20rootless`20mode,`20which`20isn't`20too`20surprising,`20if`20you`20thi
Vnk`20about`20it`20$\ldots$
X
X\shead`7BSection`203.9:`20`20Other`20Commands`7D
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B%
X\bf`20Info\rm%
X\`20\`20(Keyboard\`20equivalent\`20'i')`7D`7D
XOpens`20and`20closes`20the`20%
X\it`20xv`20info`20\rm%
Xwindow.`20`20See`20`60`60Section`204:`20The`20Info
XWindow''`20for`20more`20details.
X
X\IPitem`7B`7B%
X\bf`20ColEdit\rm%
X\`20\`20(Keyboard\`20equivalent\`20'e')`7D`7D
XOpens`20and`20closes`20the`20%
X\it`20xv`20color`20editor`20\rm%
Xwindow.`20`20See`20`60`60Section`205:`20The
XColor`20Editor''`20for`20more`20details.
X
X\IPitem`7B`7B%
X\bf`20Load\rm%
X\`20\`20(Keyboard\`20equivalent\`20$<$ctrl-L$>$)`7D`7D
XOpens`20the`20%
X\it`20xv`20load`20\rm%
Xwindow.`20`20See`20`60`60Section`206:`20The`20Load`20Window''`20for`20more
Xdetails.
X
X\IPitem`7B`7B%
X\bf`20Save\rm%
X\`20\`20(Keyboard\`20equivalent\`20$<$ctrl-S$>$)`7D`7D
XOpens`20the`20%
X\it`20xv`20save`20\rm%
Xwindow.`20`20See`20`60`60Section`207:`20The`20Save`20Window''`20for`20more
Xdetails.
X
X\IPitem`7B`7B%
X\bf`20Quit\rm%
X\`20\`20(Keyboard\`20equivalent\`20'q')`7D`7D
XQuits`20out`20of`20the`20program.
X
X\end`7BIPlist`7D
X
X\shead`7BSECTION`204:`09THE`20INFO`20WINDOW`7D
X
X\shead`7BSection`204.1:`20`20Overview`7D
X
X%
X`7B\it`20xv`7D
Xprovides`20a`20window`20to`20display`20information`20about`20the`20current`20i
Vmage,
Xcolor`20allocation,`20expansion,`20cropping,`20and`20any`20error`20messages.
V`20`20This
Xwindow`20can`20be`20opened`20by`20issuing`20the`20Info`20command.`20`20(Click
V`20on`20the`20Info
Xbutton`20in`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow,`20or`20type`20'i'`20in`20any`20open`20
X%
X`7B\it`20xv`7D
Xwindow.)
XYou`20can`20close`20the`20window`20by`20using`20the`20%
X\bf`20Info`20\rm%
Xcommand`20while`20the`20window`20is
Xopen.`20`20You`20can`20also`20close`20the`20window`20by`20clicking`20anywhere
V`20inside`20it.
X
XThe`20top`20portion`20of`20the`20window`20displays`20the`20program`20name,`20r
Vevision
Xdate,`20and`20patchlevel.`20`20It`20also`20shows`20the`20University`20of`20Pen
Vnsylvania
Xshield,`20the`20GRASP`20Lab`20logo,`20the`20copyright`20notice,`20and`20of`20c
Vourse,`20the
Xauthor's`20name.
X
X\shead`7BSection`204.2:`20`20The`20Fields`7D
X
XThe`20`60`60Filename''`20field`20displays`20the`20name`20of`20the`20currently
V`20loaded`20file.
XThe`20name`20is`20displayed`20without`20any`20leading`20pathname.`20`20If`20th
Vere`20is`20no
Xcurrently`20loaded`20image`20(you're`20looking`20at`20the`20default`20image)
V`20this
Xfield`20will`20display`20`60`60$<$none$>$''.
X
XThe`20`60`60Format''`20field`20displays`20information`20describing`20what`20im
Vage`20format
Xthe`20file`20is`20stored`20in,`20and`20how`20large`20the`20file`20is`20(in`20b
Vytes).
X
XThe`20`60`60Resolution''`20field`20shows`20the`20width`20and`20height`20(in
V`20image`20pixels)`20of
Xthe`20loaded`20image.`20`20Note`20that`20this`20does`20not`20necessarily`20hav
Ve`20anything
Xto`20do`20with`20the`20size`20of`20the`20image`20currently`20displayed`20on
V`20your`20screen.
XThese`20numbers`20do`20not`20change`20as`20you`20modify`20the`20display`20imag
Ve.
X
XThe`20`60`60Cropping''`20field`20displays`20the`20current`20state`20of`20any
V`20cropping
Xactivity.`20`20If`20you`20are`20looking`20at`20the`20entire`20(uncropped)`20im
Vage,`20and
Xthere`20is`20no`20cropping`20rectangle`20drawn,`20this`20field`20will`20show
V`20`60`60$<$none$>$''.
XIf`20you`20draw`20a`20cropping`20rectangle,`20or`20if`20you`20are`20viewing
V`20cropped
Xportion`20of`20image,`20this`20field`20will`20display`20something`20like`20
V`60`60247x128
Xrectangle`20starting`20at`20132,421''.`20`20See`20`60`60Section`202.2:`20Cropp
Ving''`20for`20more
Xdetails.
X
XThe`20`60`60Expansion''`20field`20gives`20you`20information`20about`20how`20th
Ve`20image`20is
Xdisplayed.`20`20It`20will`20display`20something`20like`20`60`601.58`20x`201.37
V`20(505`20x`20273)''.
XThis`20tells`20you`20that`20the`20current`20displayed`20image`20is`20505`20pix
Vels`20wide`20and
X273`20pixels`20high,`20and`20that`20it`20is`201.58`20times`20wider`20and`201.3
V7`20times`20higher
Xthan`20the`20internal`20image`20(which,`20in`20this`20case,`20had`20a`20size
V`20of`20320x200).
X
XThe`20`60`60Colors''`20field`20gives`20you`20detailed`20information`20on`20how
V`20well`20(or
Xpoorly)`20color`20allocation`20went.`20`20If`20everything`20went`20reasonably
V`20well`20it
Xwill`20display`20something`20like:
X\begin`7BIPlist`7D
X\IPitem`7B`7B`7D`7D
XGot`20all`2067`20desired`20colors.`20`20(66`20unique)
X\end`7BIPlist`7D
X
X\noindent
XThis`20means`20that`2067`20entries`20in`20the`20image's`20colormap`20were`20us
Ved`20in`20the
Ximage,`20but`20that`20only`2066`20of`20these`20colors`20were`20different,`20as
V`20far`20as`20the
XX`20server`20was`20concerned.
X
XSee`20`60`60Appendix`20E:`20Color`20Allocation''`20for`20a`20complete`20discus
Vsion`20of`20how
Xcolors`20are`20allocated,`20and`20what`20the`20`60`60Colors''`20field`20can
V`20tell`20you.
X
XNote`20that`20the`20fields`20are`20filled`20in`20as`20information`20becomes
V`20available.
XAs`20such,`20they`20can`20be`20used`20as`20a`20rough`20'progress`20indicator'
V`20when`20loading
Ximages.`20`20When`20you`20begin`20loading,`20all`20the`20fields`20are`20cleare
Vd.`20`20Once`20the
Ximage`20has`20been`20successfully`20loaded,`20the`20top`20three`20fields`20(Fi
Vlename,
XFormat,`20Resolution)`20are`20filled`20in.`20`20Once`20the`20colors`20have`20b
Veen
Xallocated,`20and`20the`20display`20image`20generated,`20the`20bottom`20three
V`20fields
Xare`20shown`20(Cropping,`20Expansion,`20and`20Colors).
X
X\shead`7BSection`204.3:`20`20Status`20Lines`7D
X
XThe`20bottom`20two`20lines`20in`20the`20info`20window`20display`20various`20er
Vror
Xmessages,`20warnings,`20and`20status`20information.`20`20These`20two`20lines
V`20are`20also
Xduplicated`20in`20the`20%
X\it`20xv`20controls`20\rm%
Xwindow.
X
XThe`20upper`20line`20is`20the`20more`20commonly`20used.`20`20It`20normally`20d
Visplays`20a
Xone-line`20summary`20of`20the`20current`20image`20and`20color`20allocation`20s
Vuccess.
XIf`20an`20error`20occurs,`20it`20will`20be`20displayed`20on`20this`20line`20as
V`20well.
X
XThe`20lower`20line`20is`20used`20to`20display`20warning`20messages.
X
X\shead`7BSECTION`205:`09THE`20COLOR`20EDITOR`7D
X
X\shead`7BSection`205.1:`20`20Overview`7D
X
XThe`20%
X\it`20xv`20color`20editor`20\rm%
Xprovides`20a`20powerful`20system`20for`20manipulating`20color
Ximages.`20`20Since`20there`20are`20many`20different`20reasons`20why`20a`20pers
Von`20would
Xwant`20to`20modify`20an`20image's`20colors,`20and`20many`20different`20types
V`20of`20images
Xthat`20may`20need`20modification,`20there`20is`20no`20one`20color`20manipulati
Von`20tool
Xthat`20would`20be`20'best'`20for`20all`20purposes.`20`20Because`20of`20this
V`20problem,`20%
X`7B\it`20xv`7D
Xgives`20the`20user`20three`20different`20color`20tools,`20all`20of`20which`20c
Van`20be`20used
Xsimultaneously.
X
X\begin`7BIPlist`7D
X\IPitem`7B`7B$\bullet$`7D`7D
XColormap`20Editing:`20This`20tool`20lets`20you`20arbitrarily`20modify`20indivi
Vdual
Xcolormap`20entries.`20`20Useful`20for`20modifying`20the`20color`20of`20caption
Vs`20or`20other
Xthings`20that`20have`20been`20added`20to`20images.`20`20Also`20works`20well
V`20on`20images`20that
Xhave`20a`20small`20number`20of`20colors,`20such`20as`20images`20generated`20by
V`20'drawing'
Xor`20CAD`20programs.`20`20It's`20also`20an`20easy`20way`20to`20spiff`20up`20bo
Vring`201--bit`20black
Xand`20white`20images.
X\IPitem`7B`7B$\bullet$`7D`7D
XHSV`20Modification:`20This`20tool`20lets`20you`20alter`20the`20image`20globall
Vy`20in`20the
XHSV`20colorspace.`20`20(See`20`60`60Appendix`20D:`20RGB`20and`20HSV`20Colorspa
Vces''`20for`20more
Xinfo.)`20`20Here`20are`20examples`20of`20the`20sort`20of`20things`20you`20can
V`20do`20with`20this
Xtool:
+-+-+-+-+-+-+-+-  END  OF PART 5 +-+-+-+-+-+-+-+-
Technical Details
Message-ID: <8981991@MVB.SAIC.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!chx400!ira.uka.de!sol.ctr.columbia.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!chx400!ira.uka.de!sol.ctr.columbia.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources
Newsgroups: vmsnet.sources
From: dyson@iowasp.physics.uiowa.edu (Rick Dyson)
Subject: xv-2-21a changes to run on VMS, part 05/08
Date: Wed, 04 Nov 1992 21:12:44 GMT
Message-ID: <8981991@MVB.SAIC.COM>
Lines: 1354
Organization: Department of Physics and Astronomy, University of Iowa
Approved: Mark.Berryman@Mvb.Saic.Com