Your message dated Sat, 04 Dec 2010 15:02:35 +0000
with message-id <[email protected]>
and subject line Bug#604254: fixed in photon 0.4.6-3
has caused the Debian Bug report #604254,
regarding photon: fails to deal with uppercase .JPG filename suffix
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
604254: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604254
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: photon
Version: 0.4.6-1.1
Severity: normal
Tags: patch

In short, the issue is with picture files ending with suffix '.JPG' in
capital letters, and creating the html page which renders the picture
in it's original size. In the generated html, the picture file name suffix
is converted to lower case, while the file it self remains with upper
case suffix. As a result, the browser cant find the file having the
picture.

In my case, I have the pictures like the following (output of 'ls -R
pict'):

pict/:
capital
small

pict/capital:
P1.JPG
P2.JPG

pict/small:
p7.jpg
p8.jpg


Photon with command line 'photon -o photon_out pict' generates the following 
files
(output of 'ls -RF photon_out'):

------------------------------------------------------------------
photon_out:
capital/
index.html
small/
<some lines removed here>

photon_out/capital:
160x120/
640x480/
800x600/
index.html
original/
P1_1024x768.html
P1_160x120.html
P1_640x480.html
P1_800x600.html
P1.html
P2_1024x768.html
P2_160x120.html
P2_640x480.html
P2_800x600.html
P2.html
<some lines removed here>

photon_out/capital/160x120:
P1.jpg
P2.jpg

photon_out/capital/640x480:
P1.jpg
P2.jpg

photon_out/capital/800x600:
P1.jpg
P2.jpg

photon_out/capital/original:
P1.JPG
P2.JPG

photon_out/small:
160x120/
640x480/
800x600/
index.html
original/
p7_1024x768.html
p7_160x120.html
p7_640x480.html
p7_800x600.html
p7.html
p8_1024x768.html
p8_160x120.html
p8_640x480.html
p8_800x600.html
p8.html
<some lines removed here>

photon_out/small/160x120:
p7.jpg
p8.jpg

photon_out/small/640x480:
p7.jpg
p8.jpg

photon_out/small/800x600:
p7.jpg
p8.jpg

photon_out/small/original:
p7.jpg
p8.jpg
------------------------------------------------------------------


The following extract from file 'photon_out/capital/P1.html' shows the
wrong reference to image P1.JPG.

      <img hspace="3" vspace="3" border="0" src="original/P1.jpg"
      alt="P1.jpg">


I fixed this problem by modifying the filename into lowercase '.jpg'
suffix when copying the picture into the 'original' directory. It can
be done by adding the following line

          filename = re.sub('^(.*)\.[^.]+$',"\\1.jpg",filename)

into function

     def process_file(sourcedir, relativepath, filename): # 
       """ Create for this file all thumbnails and return the size of the image 
"""

like this

def process_file(sourcedir, relativepath, filename): # 
  """ Create for this file all thumbnails and return the size of the image """

  srcfile = os.path.join(sourcedir, relativepath, filename)
  # We need to detect, if a image can be draw at the screen.
  # If original_size is always smaller than any sizelist (without thumbnail)
  # then image is not draw to the screen. So keep a flag that can draw this
  # image at the original_size
  npicsconverted = 0
  pic = {}
  try:
    im = Image.open(srcfile)
    if options['verbose_level'] >= 1:
      print 'Processing image', srcfile, im.format, "%dx%d" % im.size, im.mode
  except IOError, err:
    print "cannot create thumbnail for", srcfile ,"(", err.strerror, ")"
  else:
    # Foreach size of the image, resize them only when it's different from 
Original
    pic['filename'] = filename
    pic['original_size'] = im.size
    pic['extra_resolution'] = []
    if options['exif']:
      file = open(srcfile, 'rb')
      pic['exif'] = EXIF.process_file(file)
    if im.size[1] > im.size[0]: # Keep aspect ratio
      pic['aspect'] = 34
      pic['ratio'] = float(im.size[1])/im.size[0]
    else:
      pic['aspect'] = 43
      pic['ratio'] = float(im.size[0])/im.size[1]

    for (w,h) in options['sizelist'] + [(-1,-1)]:
      if w == -1 and h == -1: # Small hack to process code at the end of the 
loop
        # If no image is converted (without counting thumbnail), then copy the 
original
        # original size can not be in the 'sizelist'
        if npicsconverted<2 and (0,0) not in options['sizelist']:
          (w,h) = (0,0)
          pic['extra_resolution'].append((0,0))
        else:
          break
      if w == 0 and h == 0: # Special case when it is a original file
        if options['forcecompress']:
          (w,h) = im.size
        else:
          subdir = 'original'
          destdir = os.path.join(options['output_directory'], relativepath, 
subdir)

          # Markku Majaniemi @ 21-Nov-2010
          # the following fix is for uppercase picture filenames (e.g. 
"P1.JPG").
          # make the copied file's name to lower case ("P1.jpg")
          filename = re.sub('^(.*)\.[^.]+$',"\\1.jpg",filename)

          destfile = os.path.join(destdir, filename)
          if file_is_newer(destfile, srcfile):
            safe_mkdir(destdir)
            shutil.copyfile(srcfile, destfile)
          npicsconverted+=1

          # code continues...


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages photon depends on:
ii  python                  2.6.6-3+squeeze1 interactive high-level object-orie
ii  python-central          0.6.16+nmu1      register and build utility for Pyt
ii  python-imaging          1.1.7-2          Python Imaging Library

Versions of packages photon recommends:
ii  dcraw                         8.99-1+b1  decode raw digital camera images
ii  gimp                          2.6.10-1   The GNU Image Manipulation Program

photon suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: photon
Source-Version: 0.4.6-3

We believe that the bug you reported is fixed in the latest version of
photon, which is due to be installed in the Debian FTP archive:

photon_0.4.6-3.debian.tar.gz
  to main/p/photon/photon_0.4.6-3.debian.tar.gz
photon_0.4.6-3.dsc
  to main/p/photon/photon_0.4.6-3.dsc
photon_0.4.6-3_all.deb
  to main/p/photon/photon_0.4.6-3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kevin Coyner <[email protected]> (supplier of updated photon package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 04 Dec 2010 12:56:21 +0000
Source: photon
Binary: photon
Architecture: source all
Version: 0.4.6-3
Distribution: unstable
Urgency: low
Maintainer: Kevin Coyner <[email protected]>
Changed-By: Kevin Coyner <[email protected]>
Description: 
 photon     - a static HTML gallery generator
Closes: 604254
Changes: 
 photon (0.4.6-3) unstable; urgency=low
 .
   *  Patch that enables use of fully capitalized filenames. Thanks to Markku
      Majaniemi. Closes: #604254.
   *  Patch Photon/airspeed.py to remove unneeded python shebang.
Checksums-Sha1: 
 02ddb70f84fce54ca16dd61433ee591eb5ce8625 1394 photon_0.4.6-3.dsc
 69e76f4c9accc7d0320527b658e39246f85cb5a2 8596 photon_0.4.6-3.debian.tar.gz
 638d21999dccbc38a1021a4203acc9f6538ff540 67248 photon_0.4.6-3_all.deb
Checksums-Sha256: 
 535198a3d18fbcdd326e5bb9258fec5aea41eef1e3b82ac4e8d65a4f817bc703 1394 
photon_0.4.6-3.dsc
 7a974673e54a6cb9bedcfc68e28775d946a69eb8687216bedcab08b4754832a1 8596 
photon_0.4.6-3.debian.tar.gz
 25e1db5acc6f6c0ea4873381b84424d37f429cbec485450e7e151bebe1268f17 67248 
photon_0.4.6-3_all.deb
Files: 
 8b1025a371530cd77c553bdc6a11f959 1394 graphics optional photon_0.4.6-3.dsc
 fa697161d292b21ff448071cf77b1cf7 8596 graphics optional 
photon_0.4.6-3.debian.tar.gz
 b8d3719fac84e2ae13f43ed198edbd46 67248 graphics optional photon_0.4.6-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJM+k0WAAoJEOuzGmLIXY9xlGQH/2IFkZZMHAM3cPBwNzp+BkUw
gp86L34HGxbg5trIW2an7Tx3NNke5vDj4wKBBmXdaqETl2ZeVLSOdXhYKP/Xa9rk
CFb6C4yvqcKtlVKnBgusUdum9yWYs1LWdbHcgTBodTsmCxzlXmKM9UsnNDnBizMl
oOCbDlhLCGVI0dU9paSZlBeVVDvgly2iZPmauQtD6XUzxRBDM3iTBWwZHk5KY9qQ
zdtfFVK+ixJ11+ck8Kthbitl2DQZAWg+p8GBL3jz/gTlnc9oID9m2Wro7Xv3Rbyr
oSfKOkb3HXntAMIEWaiS0iXwrOoWmTcMQ1Qn+QyMXVi/+OKhu9e9Z0DIV7iH+Nk=
=fwlP
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to