Re: Digital cameras again

Date view Thread view Subject view Author view

From: Strata Rose Chalup (strata@virtual.net)
Date: Thu Apr 13 2000 - 14:04:22 PDT


If you are a hackerly type, go for one of the higher-end Kodak consumer
cameras, such as the DC280. I have a DC265, and while I have not yet
actually written any programs for the camera, I have downloaded the
development environment-- there is this lovely language (Digita), of
which I append a couple of examples at the end of this note.

Yeah, it uses a compact flash card, but you can get a PCMCIA holder for
it and then it becomes a special case of "floppy". If you are a
conventional photographer, and have existing lenses, etc, you want to
consider that when picking your digital camera.

My two cents, in haste, between meetings. For an example of high res
(but not the "super quality" diff-fill hack) for this camera,
http://www.virtual.net/digipix/boo1.jpg

Cheers,
_Strata

Rodent of Unusual Size wrote:
>
> Well, having received a virtual gift certificate for a digital
> camera (i.e., it's now in the household budget), I'm wondering
> which one to get. This is for casual use, so the price needs
> to be under US$1000 (and by the more the better).
>
> I rather like the idea of write-to-floppy cameras, since they
> produce images that are instantly transportable and don't
> require installing download software on a machine nor doing
> the cabling thing when you want to upload. Just pop the floppy
> and you're there. I think the main drawback is the interval
> between shots.
>
> I'm also somewhat in favour of rechargeable batteries over
> the buy/use/discard variety. I spent beaucoups bucks on
> coppertops one day with a borrowed Casio.
>
> Consumer Reports' top choices are flashcard and disposable-battery
> types. I'm looking for good-to-excellent quality mated with
> maximum portability. My sister has an older Mavica, but it
> falls down a bit on the quality side.
>
> Any suggestions from the assembled techno-mavens?
> --
> #ken P-)}
>
> Ken Coar <http://Golux.Com/coar/>
> Apache Software Foundation <http://www.apache.org/>
> "Apache Server for Dummies" <http://Apache-Server.Com/>
> "Apache Server Unleashed" <http://ApacheUnleashed.Com/>

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Strata Rose Chalup [schalup@netscape.com]   |        strata@virtual.net
Project Manager                             |     VirtualNet Consulting
iPlanet/Netscape Professional Services      |    http://www.virtual.net/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# # ELECTRONIC RULER (Version 1.0) # # Written by: Brian Downs (bwdowns@lucent.com) # Last Updated: 2/14/99 # ##################################################################################### # # The ELECTRONIC RULER uses the auto-focus capabilites of your DC 260/265 camera # to help you approximate distances, areas of some simple shapes, and even the height # of objects! # # After starting the script and selecting what you want to do, you will measure # distances by shooting a picture that covers the distance. For example, to get the # lenght of your backyard, stand at one end and shoot a picture of the fence at your # yard's border. The script will then 'process' the photo to get the focus distance. # The photo is then erased. When focusing on an object, place it in the very center # of the viewfinder since single-spot focusing is in effect while the script runs. # Also, you'll notice that the flash is temporarily turned off while the script runs # to conserve power. # ##################################################################################### #

name "Electronic Ruler" mode 0 menu "Utility Scripts" label "Electronic Ruler"

declare u: uFocusDistance,uLen, uNewFileCount, uOrigFileCount, uRadOrDiam declare u: uImageSize, uImageComp, uInstantRev, uFlashMode, uFocusMode declare u: uFocusMethod, uMetFocDist1, uMetFocDist2, uTemp, uTemp1 declare u: uConToFTRet, uGetDistReturn, uInfinity declare u: uLength, uWidth, uGetFT12Ret, uMainChoice declare u: uSqRootRet, uHelpChoice, uDoubleDistance, uCameraType declare f: fValue, fGuess1, fGuess2, fTemp declare f: fFocusDistance, fFDFeet, fLength, fWidth, fArea declare s: sPath, sDistPrompt1, sDistPrompt2, sProductName declare n: nFilename declare b: bStatus declare i: iCmdStatus, iIteration, iFDFeet1, iFDFeet2, iFDFeet1sav, iFDFeet2sav

# # Get camera type and use a unsigned integer to identify it GetProductInfo ("ptid", sProductName) if sProductName == "KODAK DIGITAL SCIENCE DC260" uCameraType = 260 end if sProductName == "KODAK DC265 ZOOM DIGITAL CAMERA" uCameraType = 265 end

# Error trap - in case of a product name change or being used # on cameras other than DC260/DC265 if uCameraType != 260 if uCameraType != 265 DisplayClear() DisplayLine("") DisplayLine("This script intended for use on Kodak DC260 or DC265 cameras only!") Wait(4000) goto Exit end end

uInfinity = 65535

MainMenu: uMainChoice = 0 SetOption(1, "- Distance to object", 1) SetOption(2, "- Area of rectangular region", 0) SetOption(3, "- Area of triangular region", 0) SetOption(4, "- Area of circular region", 0) SetOption(5, "- Height of object", 0) SetOption(6, "- Help", 0) SetOption(7, "- Exit", 0) GetOption(uMainChoice)

if uMainChoice == 1 goto DistanceToObject end if uMainChoice == 2 goto RectangleArea end if uMainChoice == 3 goto TriangleArea end if uMainChoice == 4 goto CircleArea end if uMainChoice == 5 goto HeightOfObject end if uMainChoice == 6 goto ScriptHelp end if uMainChoice == 7 goto Exit end

########################### DISTANCE TO OBJECT (Menu Choice) DistanceToObject: sDistPrompt1 = "" sDistPrompt2 = "Take picture of object" uGetDistReturn = 1 goto GetDistance GetDistReturn1:

if uFocusDistance == uInfinity goto TooFarExit end

uConToFTRet = 1 goto ConvertToFeet ConToFTRet1: Alert("Distance to object: ",iFDFeet1,".",iFDFeet2," ft") goto MainMenu

########################### AREA OF RECTANGLE (Menu Choice) RectangleArea: Alert("You will be shooting 2 distances: 1 each for the rectangle's length and width. (Press Continue)")

sDistPrompt1 = "" sDistPrompt2 = "Shoot first dimension" uGetDistReturn = 2 goto GetDistance GetDistReturn2: if uFocusDistance == uInfinity goto TooFarExit end uConToFTRet = 2 goto ConvertToFeet ConToFTRet2: fLength = fFDFeet Alert("First dimension is ",iFDFeet1,".",iFDFeet2," ft. Press Continue to shoot 2nd dimension.") iFDFeet1sav = iFDFeet1 iFDFeet2sav = iFDFeet2

sDistPrompt2 = "Shoot second dimension" uGetDistReturn = 3 goto GetDistance GetDistReturn3: if uFocusDistance == uInfinity goto TooFarExit end uConToFTRet = 3 goto ConvertToFeet ConToFTRet3: fWidth = fFDFeet Alert("Rectangular region: ",iFDFeet1sav,".",iFDFeet2sav,"ft X ",iFDFeet1,".",iFDFeet2,"ft (Press Continue)")

fArea = fWidth * fLength fFDFeet = fArea uGetFT12Ret = 1 goto GetFDFeet12 GetFT12Ret1: Alert("Area of rectangular region is ",iFDFeet1,".",iFDFeet2," sq ft (Press Continue)") goto MainMenu

########################### AREA OF TRIANGLE (Menu Choice) TriangleArea: Alert("You will be shooting 2 distances: 1 each for the triangle's height and width. (Press Continue)")

sDistPrompt1 = "" sDistPrompt2 = "Shoot first dimension" uGetDistReturn = 4 goto GetDistance GetDistReturn4: if uFocusDistance == uInfinity goto TooFarExit end uConToFTRet = 4 goto ConvertToFeet ConToFTRet4: fLength = fFDFeet Alert("First dimension is ",iFDFeet1,".",iFDFeet2," ft. Press Continue to shoot 2nd dimension.") iFDFeet1sav = iFDFeet1 iFDFeet2sav = iFDFeet2

sDistPrompt2 = "Shoot second dimension" uGetDistReturn = 5 goto GetDistance GetDistReturn5: if uFocusDistance == uInfinity goto TooFarExit end uConToFTRet = 5 goto ConvertToFeet ConToFTRet5: fWidth = fFDFeet Alert("Triangular region: ",iFDFeet1sav,".",iFDFeet2sav,"ft X ",iFDFeet1,".",iFDFeet2,"ft (Press Continue)")

fArea = fWidth * fLength fArea = fArea / 2.0 fFDFeet = fArea uGetFT12Ret = 2 goto GetFDFeet12 GetFT12Ret2: Alert("Area of right triangular region is ",iFDFeet1,".",iFDFeet2," sq ft (Press Continue)") goto MainMenu

########################### AREA OF CIRCLE (Menu Choice) CircleArea: Alert("You need to shoot either the diameter or radius. Tell me which. (Press Continue)") uRadOrDiam = 0 SetOption(1, "- I'll measure the radius", 1) SetOption(2, "- I'll measure the diameter", 0) GetOption(uRadOrDiam)

if uRadOrDiam == 1 sDistPrompt2 = "Shoot the radius" end if uRadOrDiam == 2 sDistPrompt2 = "Shoot the diameter" end

sDistPrompt1 = "" uGetDistReturn = 6 goto GetDistance GetDistReturn6: if uFocusDistance == uInfinity goto TooFarExit end

if uRadOrDiam == 2 uFocusDistance = uFocusDistance / 2 end uConToFTRet = 6 goto ConvertToFeet ConToFTRet6: fLength = fFDFeet

uGetFT12Ret = 5 goto GetFDFeet12 GetFT12Ret5: iFDFeet1sav = iFDFeet1 iFDFeet2sav = iFDFeet2

fArea = 3.1416 * fLength * fLength fFDFeet = fArea uGetFT12Ret = 3 goto GetFDFeet12 GetFT12Ret3: Alert("Area of circular region with radius ",iFDFeet1sav,".",iFDFeet2sav,"ft is ",iFDFeet1,".",iFDFeet2," sq ft") goto MainMenu

########################### HEIGHT OF OBJECT (Menu Choice) HeightOfObject: Alert("You will be shooting 2 distances (Press Continue)") Alert("The 1st will be straight at the object, the 2nd at its top. (Press Continue)")

sDistPrompt1 = "" sDistPrompt2 = "Shoot first measurement" uGetDistReturn = 7 goto GetDistance GetDistReturn7: if uFocusDistance == uInfinity goto TooFarExit end uConToFTRet = 7 goto ConvertToFeet ConToFTRet7: fLength = fFDFeet Alert("First measurement is ",iFDFeet1,".",iFDFeet2," ft. Press Continue to shoot at the top of object.") iFDFeet1sav = iFDFeet1 iFDFeet2sav = iFDFeet2

sDistPrompt2 = "Shoot top of object" uGetDistReturn = 8 goto GetDistance GetDistReturn8: if uFocusDistance == uInfinity goto TooFarExit end uConToFTRet = 8 goto ConvertToFeet ConToFTRet8: fWidth = fFDFeet Alert("Distance to top of object: ",iFDFeet1,".",iFDFeet2,"ft (Press Continue)")

if fLength > fWidth Alert("Oops! Distance to top of object was measured as less than distance straight to object...") Alert("Can't continue with the calculation. Press continue to return to main menu...") goto MainMenu end

fWidth = fWidth * fWidth fLength = fLength * fLength fValue = fWidth - fLength # now get square root of fValue uSqRootRet = 1 goto SqRoot SqRootRet1:

fFDFeet = fValue uGetFT12Ret = 4 goto GetFDFeet12 GetFT12Ret4: Alert("Height of object: ",iFDFeet1,".",iFDFeet2," ft (Press Continue)") goto MainMenu

########################### HELP (Menu Choice) ScriptHelp: uHelpChoice = 0 SetOption(1, "- Overview", 1) SetOption(2, "- Help with Distance", 0) SetOption(3, "- Help with Area of Rectangle", 0) SetOption(4, "- Help with Area of Triangle", 0) SetOption(5, "- Help with Area of Circle", 0) SetOption(6, "- Help with Height of Object", 0) SetOption(7, "- Return to Main Menu", 0) SetOption(8, "- Exit", 0) GetOption(uHelpChoice)

if uHelpChoice == 8 goto Exit end if uHelpChoice == 7 goto MainMenu end

if uHelpChoice == 1 Alert("The Electroninc Ruler helps you measure approximate distances and areas...") Alert("When focusing on an object, make sure it is centered since single-spot focusing is in effect...") Alert("This script temporarily turns your flash off to conserve power...") Alert("There is a delay after shooting a distance since a photo must be processed and then deleted.") goto ScriptHelp end if uHelpChoice == 2 Alert("This choice simply measures a single straight line distance.") goto ScriptHelp end if uHelpChoice == 3 Alert("This choice approximates the area of a rectangular region...") Alert("This is done with you shooting 2 distances, its length and width...") Alert("Formula: Area = Length x Width") goto ScriptHelp end if uHelpChoice == 4 Alert("This choice approximates the area of a RIGHT triangular region...") Alert("This is done with you shooting 2 distances, its width and height...") Alert("Formula: Area = 1/2 x Width x Height") goto ScriptHelp end if uHelpChoice == 5 Alert("This choice approximates the area of a circular region...") Alert("This is done with you shooting the circle's radius or diameter...") Alert("Formula: Area = PI x radius x radius") goto ScriptHelp end if uHelpChoice == 6 Alert("This choice approximates the vertical height of an object (eg, a telephone pole)...") Alert("The object must be perpindicular to the ground (ie, straight up)...") Alert("You will shoot 2 distances...") Alert("The 1st distance, D1, is straight at the object parallel to the ground...") Alert("The 2nd distance, D2, is at the top of the object (without moving from where the 1st photo was taken)...") Alert("Formula: Height = Sqrt(D2xD2 - D1xD1) [to this you should add the distance the camera is from the ground]") goto ScriptHelp end

##################################### GET DISTANCE (Subroutine) GetDistance: #input: DistPrompt1, DistPrompt2 #output: uFocusDistance (in cm)

# save some settings GetCameraState("ssiz", uImageSize) GetCameraState("scpn", uImageComp) GetCameraState("irev", uInstantRev) GetCameraState("smod", uFlashMode) GetCameraState("fmtd", uFocusMethod) GetCameraState("fmod", uFocusMode) if sDistPrompt1 != "" Alert(sDistPrompt1)

end

# make some temp changes SetCameraState("ssiz", 3) SetCameraState("scpn", 4) SetCameraState("irev", 0) SetCameraState("smod", 1) SetCameraState("fmtd", 2) SetCameraState("fmod", 1)

SetCaptureMode(still) WaitForShutter(sDistPrompt2) StartCapture() GetNewFileCount(uOrigFileCount)

# reset the original values SetCameraState("ssiz", uImageSize) SetCameraState("scpn", uImageComp) SetCameraState("irev", uInstantRev) SetCameraState("smod", uFlashMode) SetCameraState("fmtd", uFocusMethod) SetCameraState("fmod", uFocusMode)

DisplayClear() DisplayLine("Processing temporary photo.") DisplayLine("") Display("Please wait...") waitSomeMore: Wait(2200) GetNewFileCount(uNewFileCount) if uNewFileCount <= uOrigFileCount Display(".") goto waitSomeMore end

EndCapture()

uNewFileCount = uNewFileCount - 1 #Alert("NewFileCount=",uNewFileCount) iCmdStatus = 0 iCmdStatus = GetNewFileInfo(uNewFileCount, sPath, nFilename, uLen, bStatus) if iCmdStatus != 0 Alert("Oops! Internal Error: GetNewFileInfo returned ", iCmdStatus) goto Exit end #Alert("Status=",iCmdStatus," Filename=",nFilename) iCmdStatus = 0 iCmdStatus = GetFileTag(sPath, nFilename, "fdst", uFocusDistance) if iCmdStatus != 0 Alert("Oops! Internal Error: GetFileTag returned ", iCmdStatus) goto Exit end EraseFile(sPath, nFilename)

if uGetDistReturn == 1 goto GetDistReturn1 end if uGetDistReturn == 2 goto GetDistReturn2 end if uGetDistReturn == 3 goto GetDistReturn3 end if uGetDistReturn == 4 goto GetDistReturn4 end if uGetDistReturn == 5 goto GetDistReturn5 end if uGetDistReturn == 6 goto GetDistReturn6 end if uGetDistReturn == 7 goto GetDistReturn7 end if uGetDistReturn == 8 goto GetDistReturn8 end

############################# CONVERT TO FEET (Subroutine) ConvertToFeet: # input: uFocusDistance in cm # output: fFDFeet, iFDFeet1, iFDFeet2

uDoubleDistance = 1 if uFocusDistance > 32767 uDoubleDistance = 2 uFocusDistance = uFocusDistance / 2 end

fFocusDistance = uFocusDistance fFocusDistance = fFocusDistance / 2.5381 if uDoubleDistance == 2 fFocusDistance = fFocusDistance + fFocusDistance end fFDFeet = fFocusDistance / 12.0 uGetFT12Ret = 0 goto GetFDFeet12 GetFT12Ret0:

if uConToFTRet == 1 goto ConToFTRet1 end if uConToFTRet == 2 goto ConToFTRet2 end if uConToFTRet == 3 goto ConToFTRet3 end if uConToFTRet == 4 goto ConToFTRet4 end if uConToFTRet == 5 goto ConToFTRet5 end if uConToFTRet == 6 goto ConToFTRet6 end if uConToFTRet == 7 goto ConToFTRet7 end if uConToFTRet == 8 goto ConToFTRet8 end if uConToFTRet == 10 goto ConToFTRet10 end

############################# GET FEET 1&2 VALUES (Subroutine) GetFDFeet12: #input: fFDFeet (eg, 13.92) #output: iFDFeet1 (13), iFDFeet2 (9) iFDFeet1 = fFDFeet fFocusDistance = iFDFeet1 fFocusDistance = fFDFeet - fFocusDistance fFocusDistance = fFocusDistance * 10.0 iFDFeet2 = fFocusDistance if uGetFT12Ret == 0 goto GetFT12Ret0 end if uGetFT12Ret == 1 goto GetFT12Ret1 end if uGetFT12Ret == 2 goto GetFT12Ret2 end if uGetFT12Ret == 3 goto GetFT12Ret3 end if uGetFT12Ret == 4 goto GetFT12Ret4 end if uGetFT12Ret == 5 goto GetFT12Ret5 end if uGetFT12Ret == 9 goto GetFT12Ret9 end

############################# SQUARE ROOT (Subroutine) SqRoot: #input: fValue -- number we want root of #output: fValue -- with the root

# use Gaussian iterative technique fGuess1 = fValue / 2.0 iIteration = 1

NextSqRootAppr: fGuess2 = fGuess1 + fValue / fGuess1 fGuess2 = fGuess2 / 2.0 if iIteration == 5 goto HaveSqRoot end fTemp = fGuess1 - fGuess2 if fTemp < 0.0 fTemp = 0.0 - fTemp end if fTemp < 0.05 goto HaveSqRoot end

fGuess1 = fGuess2 iIteration = iIteration + 1 goto NextSqRootAppr

HaveSqRoot: fValue = fGuess2

if uSqRootRet == 1 goto SqRootRet1 end if uSqRootRet == 9 goto SqRootRet9 end

############################# TOO FAR EXIT TooFarExit: Alert("Error: Object is beyond the focus distance of camera. (Press Continue)") goto Exit

Exit:

exitscript

Kodak: Writing Scripts
[Kodak DC260 Zoom Digital Camera:

			Incredible Pictures, Incredibly Easy]
[scripting your camera]

Writing Scripts

Scripts are simply a set of text commands that can be processed and understood by the camera, resulting in the completion of an imaging task. So, you can use scripting to simplify complex operations, saving you time. Automate repetitive tasks. Or use messages displayed on the LCD to "walk" novice users step-by-step through a task, with little or no training.

If you're intrigued by this amazing new feature called scripting, you might want to try your hand at developing one. All you need is a text editor. And, learning the scripting language is often fairly intuitive for anyone knowledgeable about programming languages. Here is what a sample script looks like:

# This script takes pictures as fast as they can be processed and until the memory card is full (or the script is aborted).
name "Rapid Fire"
mode 0
declare i:status
declare i:iImageRaw
declare u:IPIP
declare u:uImageTaken, uImageAvail, uStorage
declare b: bSystem, bCapture, bVendor

SetCaptureMode (still)
WaitForShutter ("Press shutter when ready")

uStorage = 1
iImageRaw = -1
IPIP = 0x10000000

PicLoop:
GetStorageStatus (uStorage, uImageTaken, uImageAvail, iImageRaw)
if uImageAvail < 2
DisplayClear()
DisplayLine("Memory is full.")
Wait (5000)
goto Done
end

WaitLoop:
status = 0
GetCameraStatus (bSystem, bCapture, bVendor)
if bSystem & IPIP
Wait (1500)
goto WaitLoop
end
DisplayClear ()
status = 0
StartCapture()
DisplayClear()
DisplayLine("Processing...")
if status != 0
DisplayClear()
Alert ("Got ", status, " for StartCapture!")
end

goto PicLoop

Done: exitscript

If this looks too complex to write, don't worry. There are lots of people who are developing scripts right now. You can download free scripts from Kodak or from other sites on the internet.

If you're interested in writing your own scripts, take the next step and join the Kodak Developer Relations Group (DRG). You'll receive a Scripting Software Development Kit (SDK) complete with all the necessary tools to create and upload customized programs that work with DC220, DC260, and DC265 Cameras.

More on Scripting

Scripting

Writing Scripts

Download Scripts

Links for Scripting


Cameras that
use Scripting

KODAK DC265

KODAK DC260

KODAK DC220




[Kodak] Home | Search | Products | Support | Shop | Member Services |
Contact webmaster if this site presents any problems.
Copyright © Eastman Kodak Company, 1994-1999 and Privacy Practices.

 

# SuperQty.csm Version 1.0.0000

# The routine allows the user to change the image quality to Super on the DC265 camera only. # The flow of the script is as follows: # # A. Get camera type: KODAK DC265 else go to error processing. # B. Get camera initial state (compression only) # C. Get camera capabilities (compression only) # D. Get the user's selection for Capture type # E. Get user's selection for Super Quality Mode On/Off # 1. Super Quality Mode On: Set to Super (minimum) level of compression # for the selected Capture type # - If current mode is Super # - Leave mode unchanged # - Notify the user and exit the script # - If current mode is not Super # - Change mode to Super # - Notify the user of Super level setting # 2. Super Quality Mode Off: Return to a menu to select new level of compression # - If current mode is not Super # - Leave mode unchanged # - Notify the user and exit the script # - If current mode is Super # - Display a menu for new mode # - Upon user selection of new mode # - Change mode to selected setting # - Notify the user of new setting # 3. Help: Display Help Screens in sequence if selected. # F. Error processing if necessary.

name "Super Quality Mode" mode 0 menu "Kodak Scripts" label "Super Quality Mode"

# Variable declaration and definition declare u: uTemp, uCameraType declare u: uCurrentComp, uValue, uCount declare u: uSelectSetting, uCompCount, uNewComp, uDefault declare u: uCompMinValue, uCompMaxValue declare i: iFlagOn, iFlagOff, iErrorCode, iFlag0, iFlag1 declare s: sProductName, sTemp, sDesc, sSetting, sCompr declare s: sCompName, sCapMode # Variable initialization iErrorCode = 0 iFlagOn = 1 iFlagOff = 0 uCameraType = 0 uCurrentComp = 0

# Get camera name, we can error out if non DC265 camera

GetProductInfo ("ptid", sProductName) if sProductName != "KODAK DC265 ZOOM DIGITAL CAMERA" iErrorCode = 10 goto ErrorProc end #Get capture mode from the user

SetOption (1, "Still...", iFlagOff) SetOption (2, "Burst...", iFlagOff) SetOption (3, "Timelapse...", iFlagOff) GetOption (uSelectSetting)

if uSelectSetting == 1 SetCaptureMode (still) sCapMode = "scpn" end

if uSelectSetting == 2 SetCaptureMode (group) sCapMode = "bcpn" end

if uSelectSetting == 3 SetCaptureMode (tlap) sCapMode = "tcpn" end

# Get initial camera settings

GetCameraState (sCapMode, uCurrentComp) if uCurrentComp == 5 iFlag0 = 0 iFlag1 = 1 end if uCurrentComp != 5 iFlag0 = 1 iFlag1 = 0 end GetCapabilitiesCount (sCapMode, uCompCount, uValue) uTemp = 0 GetCapabilitiesListItem (sCapMode, uTemp, sDesc, uCompMaxValue) uTemp = uCompCount - 1 GetCapabilitiesListItem (sCapMode, uTemp, sDesc, uCompMinValue)

GetSetting: # get user selected quality SetOption (1, "Off", iFlag0) SetOption (2, "On", iFlag1) SetOption (3, "Help", iFlagOff) GetOption (uSelectSetting) # Default is menu for new level compression if uSelectSetting == 1 if uCurrentComp != 5 Alert ("Exiting script. Picture quality left unchanged!") goto Done end Select2: SetOption (0, "Good", iFlagOff) SetOption (1, "Better", iFlagOff) SetOption (2, "Best", iFlagOff) GetOption (uNewComp) if uNewComp == 0 uDefault = uCompMaxValue sCompName = "Good" end if uNewComp == 1 uDefault = uCompMaxValue + 1 sCompName = "Better" end if uNewComp == 2 uDefault = uCompMinValue - 1 sCompName = "Best" end iErrorCode = SetCameraState (sCapMode, uDefault) if iErrorCode == 0 Alert ("The picture quality is now set to ", sCompName) end if iErrorCode !=0 goto ErrorProc end goto Done end # Super is the lowest compression

if uSelectSetting == 2 if uCurrentComp == 5 Alert ("Exiting script. Picture quality left unchanged!") goto Done end iErrorCode = SetCameraState (sCapMode, uCompMinValue) if iErrorCode !=0 goto ErrorProc end GetCameraState (sCapMode, uCurrentComp) if uCurrentComp == 5 Alert ("The picture quality is now set to Super") end goto Done end # Help selection screens

if uSelectSetting == 3 Alert ("This script sets the picture quality to a higher level than available in the Best setting.") Alert ("The Super setting results in larger image file sizes, and will reduce the number of images available on the memory card.") end

ErrorProc: if iErrorCode == 0 goto Done end DisplayClear () if iErrorCode == 10 Alert ("Error: camera not supported.") goto Done end if iErrorCode == 601 Alert ("ERROR getting picture quality setting!") goto Done end

Done:

exitscript



Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Apr 13 2000 - 14:26:11 PDT