Gthumb, fel storlek på bilder
Beskrivning
När man exporterar ut sina bilder till en websida får thumbnails och de mellanstora bilderna ett "kvadratiskt" utseende. Detta beror på en "finess" i gthumb och botas med följande:
Åtgärda thumbnails
I huvudkatalogen där websidan skapas av gthumb finns en index.html. Där finns width="159" height="159". Tag antingen bort height="159" eller både width="159" och height="159". Siffrorna 159 kan dock vara andra. För varje thumbnail förekommer detta så det måste ändras på flera ställen. Spara och kolla att alla thumbnails ser ok ut.
Exempel på rad efter korrigering:
<a class="thumbnail-image" href="html/000-IMG_2330.JPG.html" title="Click to view the image"> <img src="thumbnails/000-IMG_2330.JPG.small.jpeg" alt="thumbnails/000-IMG_2330.JPG.small.jpeg" width="159" /></a>
Åtgärda bilderna
De mellanstora bilderna lider av samma problem men här är det en separat fil för varje bild. Följande kod har fungerat för att åtgärda detta:
cd rotkatalog för websidan/html for file in $(ls ./); do sed -i -e 's/width="650" height="650"//g' $file ;done
Återigen, siffrorna 650 kan mycket väl vara andra siffror.
Ladda om websidan och kontrollera.
Följande är från https://bugzilla.redhat.com/show_bug.cgi?id=1085550
Michal Jaegermann 2014-04-08 18:10:22 EDT Description of problem: When exporting selected images into a web album gthumb does keep ratio of exported images but on index pages it writes: width="159" height="159" for a landscape thumbnail and width="90" height="90" if this happens to be a portrait, in every 'class="thumbnail-image"' anchor. For files in 'html/' subdirectory and 'class="preview"' these are, respectively, width="650" height="650" and width="450" height="450" Results are quite messy when displayed in a browser. Not that surprising. The simplest fix is to drop these width/height specifications as they are definitely not required there; thumbnails and previews have required dimensions. Version-Release number of selected component (if applicable): gthumb-3.2.6-1.fc20 How reproducible: always Additional info: Older gthumb versions did not suffer from that attack of "smartness" even if spurious size specs were present (but they did not force squares). Comment 1 Laurent G 2014-06-09 12:04:36 EDT I get the same issue... I had a look in the template file /usr/share/gthumb/albumthemes/Wiki/image.gthtml but it does not help. The size restriction should be generated by the '<%= image preview' in this line: 67 <a href="<%= file_name with_relative_path %>"><%= image preview class="preview" %></a> Anyway, I write a one line script to remove the 'width' and 'height' instructions from the html pages. It can help as workaround waiting a better solution. cd ~/tmp/my-generated-gallery/ for file in $(ls -1 html/); do sed -i -e 's/width="..." height="..."//g' $file ;done