Cycletourist Temp

This is a "Temp" page ... a place for things that may not always be on my site.
► Scroll down for the topic you came here to read ◄


ImageMagick write IPTC Caption with quotes
I have discovered a problem in Imagemagick when trying to write an IPTC Caption with embedded quotes (quotes delimit the caption so embedded quotes must be converted to the " html character entity). In some cases (it seems to depend on there being more than a certain number of characters) the " causes Imagemagick to transpose or skip over characters in the caption string. The problem only occurs on my Linux host server. It does not occur on Windows. The following example demonstrates.


iptc_image.jpg
Imagemagick command to write iptc data in file "iptc_caption.txt" to "iptc_image_out.jpg."
convert +profile 8BIM,IPTC -profile 8BIMTEXT:iptc_caption.txt "iptc_image.jpg" "iptc_image_out.jpg"

Contents of iptc_caption.txt
8BIM#1028="IPTC" 2#120#Caption=""0123456789" 0123456789 0123456789 0123456789"
This is sample data to make it easy to see what happens. The problem occurs when I try to enter a caption that contains quotes.

"0123456789" 0123456789 0123456789 0123456789

The quotes have to be encoded as " or they will mark the end of the caption. The error also only seems to occur if the caption contains "enough(?)" characters.


iptc_image_out.jpg

Raw file data from "image_iptc_out.jpg" (IPTC Caption is afer "8BIM2x-")
JFIFddNPhotoshop 3.08BIM2x-"0123456789" 01289 0123 0123456789 0123456789
Or using the identify command.
> identify -format "%[IPTC:2:120]" iptc_image_out.jpg > "0123456789" 01289 0123 0123456789 0123456789
Notice how the caption has been mangled. It should read:

"0123456789" 0123456789 0123456789 0123456789

The caption contains the correct number of characters, but somehow the " entities have caused an error.

If I use Irfanview on my PC, or Imagemagick running under Windows (also on my PC) to write this caption it works fine. The error only occurs when using ImageMagick running on this Linux server (ImageMagick 6.7.6-8 2012-05-02 Q16).


Baseline and Chautauqua

Looking east down Baseline from just above the Chautauqua driveway.  Motorists leaving Chautauqua can not even see me at this point.  Forced to the left and then right, if a car pulls out in front of me I can not move to the left because of the barriers in the middle of the road.  Ninth street, with contentious auto traffic, is right behind the cyclist coming uphill.

Ad Based Malware

Click here to read this article.

ImageMagick Unsharp Problem


Click to see source image and "convert"ed png thumbails

Firefox 3.0 Character Questions

Some characters are now showing up looking like dominos

For example (when viewed in Firefox 3):




Firefox Sluggish Scrolling - css problem
I have an administrative page on a web site that displays member entries in a table (generated by Php and MySQL), one member entry per row. I have defined css selectors for the table cells to create a subtle 3D look for each table cell with a highlighted top and left border, and shadow for the bottom and right borders. This is a style I use a lot.

Firefox 3.0 and 3.5 have a lot of trouble scrolling this table. It is very (very) sluggish and jerky and it uses a lot of CPU (Windows XP, SP2, 1GB RAM, NVIDIA GeForce2 video card). Through experimentation I have discovered that if I simply change the border declarations from 2px to 1px, the sluggishness goes away.

Below are two fake tables of data. The css definitions are easily viewed in the source (table cell class selectors to define the borders). Opera9.64 and IE8 have no problem scrolling either of these - Safari is slow, but much better than FF.

So what is Firefox's problem, and is there something I can or should do differently with my css (I really do prefer the 2px borders). Try it yourself. Click below (try clicking on "Top" and "Bottom." too).


2 pixel borders

1 pixel borders
[Answered]  I received an answer to this problem when I asked in a mozilla newsgroup. The reason that FF scrolls so slowly is that it uses anti-aliasing at the corners where the two borders meet. FF and Opera do not anti-alias the corners. When I changed the border size to 1 pixel Firefox had no need to use anit-aliasing. Putting borders at 2 pixels (or more) makes Firefox create anti-aliasing (inbetween colors) at the corners.

PSPad Highlighter Settings Screen Shots


Click to see Screen shots and description.

Print Transparent Layers Test

[Note: The latest Firefox - Firefox 3.0 (finally!) - prints these layers correctly. ... July 2008.]
If you click on the above image you will see a graph with three sine waves overlayed on a grid.  The three sine waves are transparent background images in three separate divs that overlay the bottom grid layer.  In all, there are five layers (divs). Starting from the top they are:
  1. The green curve (div background)
  2. The blue curve (div background)
  3. The red curve (div background) - slid to the left by 100 pixels
  4. The grid (drawn with Php gdlib)
  5. A white opaque layer covering the area to the left of the grid (to hide the "slid" portion of the red curve).
The only browser capable of printing this properly is Internet Explorer (tested in IE6).  Both Firefox and Opera print only the topmost layer (the green curve).  The Print Preview looks okay, but the actual print is missing the underlying layers (the blue and red curves and the grid).

Note: You must enable the printing of backgrounds .  I also recommend using landscape mode.  And so you do not have to waste any paper or ink, you can click here to see what it would look like.


Transparent Overlay Watermarks


1998 - 2024 C. Anderson - cycletourist.com