Camera Hacker

: :

Add Comment | Related Links | TrackBack
Related Content

Can i use my camera to read an ebook ?

I was playing around with my camera (cannon a75) today, taking photographs from pages of books, and it was interesting how easy it was to read a page from a book, that i had photographed.

I have often thought about how awesome it would be to beable to put images onto my memory card, and view them on the lcd screen. Sadly past experiments have shown that the camera ignors non native images.

Is there anyway around this? It seems all someone would have to do is build a program that converts outside images to mimic the cannon image encode?

Thanks you for your replies.
Also if its not possible with this camera, do any other brands allow this sort of thing?

Willuknight
Sat, 10 Jun 2006 21:51:24 -0700

Yes, we recently figured it out on a Sony digital camera . . . see "using Sony digital camera as a picture viewer". You can download the python program to do it. It should work with Canon digital cameras as well. Try it and let us know.

Chieh Cheng
Sun, 11 Jun 2006 00:19:32 -0700

hi Chieh Cheng.

You'll have to help me as i have never tried to run a python script before.

I placed 3 images and the script in a directory called NEW on my desktop. THe images are named 01.jpg - 03.jpg.

I cmd'd to the directory and ran the script with:

C:\Documents and Settings\Willuknight\Desktop\NEW\DCF.py "01" [..."02" ]

Which unsurprisingly didn't do anything except open the python script in notepad.
Could you tell me what i should be typing in the command window ?

willuknight
Sun, 11 Jun 2006 09:25:06 -0700

willuknight,

DCF.py is a Python script. The Python interpreter doesn't come with Windows. However, you can download it for free at The Python Programming Language -- Official Website. Once you are there, click on "DOWNLOAD", and then pick "Python 2.4.3 Windows installer" (as of this writing).

Be warned that I have never used Python on Windows before (I use it on Linux). But the Python web site has documentations for you to follow along.

Once you have Python installed, you can execute the script on your three images with the following command:

DCF.py 01.jpg 02.jpg 03.jpg

If those are the only images in the current directory, you can use the following command with wild-card:

DCF.py *.jpg

Chieh Cheng
Sun, 11 Jun 2006 11:29:29 -0700

Thanks for that Chieh Cheng.

I've downloaded and installed the python interpreter.

C:\Documents and Settings\Willuknight\Desktop\NEW>dcf.py *.jpg

Traceback (most recent call last):
File "C:\Documents and Settings\Willuknight\Desktop\NEW\dcf.py", line 15, in ?

import Image
ImportError: No module named Image

Any ideas what this means?
Thankyou, Will.

willuknight
Sun, 11 Jun 2006 20:26:41 -0700

It means you are missing the "Image" module. Doing a search on Google turned up the "Python Imaging Library (PIL)" written by PythonWare. Give it a try by downloading the library from their web site.

Chieh Cheng
Mon, 12 Jun 2006 13:54:15 -0700

OMG it works !

Awesome! I put the pictures on the camera and i can actually view them :D :D

Thankyou !

I'll write up a guide about this and put it on my website.

Cheers!

Willuknight
Mon, 12 Jun 2006 17:27:53 -0700

mm something i forgot to mention. The wildcard search doesnt seem to work. I have to do it filename by file name, which isn't really practical for doing 100's of images like i wanted too.

"DCF.py *.jpg"
returns : *.jpg does not exsist

Willuknight
Mon, 12 Jun 2006 18:15:16 -0700

Did you actually used double-quotes on the command-line? Try the command without double-quotes.

Chieh Cheng
Tue, 13 Jun 2006 00:10:06 -0700

yeah, it wasn't working when i tried it the first time without the quotes.

Also i've noticed that not all images seem to work. I converted 20 pages (jpgs) from a manga using the code, yet only about half of those worked. The other half said format not compatible.

I'm puzzeled as to why some of the pages worked, and some didn't, when they're pretty similar format. All would have been edited by the same program, have the same colour resolution and page size...

Willuknight
Tue, 20 Jun 2006 22:43:59 -0700

Hey Willu, here's a method since you're using the command line:

You can make a batch file that can gather all of the *.JPG into a list and then run this thing on every JPG in that list.
I'm sure it's not the fanciest way, but it works without installing any new software. If you've never written a batch file before (so sad for you ;p ), it's easy. Just save in Notepad as a .BAT file.

Put this into notepad:

REM Turn off displaying extra stuff
@ECHO OFF
REM Clear the screen
CLS

REM Get a directory listing of all JPG
REM Take out all the extra stuff we
REM don't need. Send it to a file.
ECHO Creating list...
DIR /b *.JPG > JPGLIST.TXT

REM Now go through that file and run
REM the python thing through it.
REM As I don't know python or w/e,
REM you may need to change this. ;P

Set TF=JPGLIST.TXT
for /f "delims=" %%f in ('type "%TF%"') do call :GO_PYTHON "%%f"

GOTO DONE_PYTHON

:GO_PYTHON
ECHO Processing %1.JPG
setlocal
DCF.py %1.JPG
endlocal
exit /b

:DONE_PYTHON
ECHO Operation Complete. :)

There ya go! Happy ... python-ing...or something. :D

Aikeru
Thu, 22 Jun 2006 00:00:34 -0700

Arigatou Aikeru :)

i once tried to use a batch file before - it didn't work :D

hopefully this one does.

Cheers.

Willuknight
Thu, 22 Jun 2006 12:43:47 -0700

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 5 + 4?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.