Change the way images are shown. re #77

Jpeg quality is lowered but resolution is two times higher.
The image is then reduced with CSS.
The default value is changed.
This commit is contained in:
Sébastien Lucas 2013-07-04 22:37:27 +02:00
parent 2d0449e1d2
commit e840d4cf70
5 changed files with 38 additions and 14 deletions

View File

@ -144,7 +144,7 @@ class Book extends Base {
$out = $this->getContentArray ();
$out ["coverurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)->hrefXhtml ();
$out ["thumbnailurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL, NULL, 150)->hrefXhtml ();
$out ["thumbnailurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL, NULL, $config['cops_html_thumbnail_height'] * 2)->hrefXhtml ();
$out ["content"] = $this->getComment (false);
$out ["datas"] = array ();
$dataKindle = $this->GetMostInterestingDataToSendToKindle ();

View File

@ -64,7 +64,7 @@
/*
* Height of thumbnail image for HTML
*/
$config['cops_html_thumbnail_height'] = "70";
$config['cops_html_thumbnail_height'] = "164";
/*
* Icon for both OPDS and HTML catalog

View File

@ -51,7 +51,7 @@
$src_img = imagecreatefromjpeg($file);
$dst_img = imagecreatetruecolor($nw,$nh);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nw, $nh, $w, $h);//resizing the image
imagejpeg($dst_img,null,100);
imagejpeg($dst_img,null,80);
imagedestroy($src_img);
imagedestroy($dst_img);
return;
@ -76,7 +76,7 @@
$src_img = imagecreatefromjpeg($file);
$dst_img = imagecreatetruecolor($nw,$nh);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nw, $nh, $w, $h);//resizing the image
imagejpeg($dst_img,null,100);
imagejpeg($dst_img,null,80);
imagedestroy($src_img);
imagedestroy($dst_img);
return;

View File

@ -175,21 +175,33 @@ max-width:800px;
/*-------------books article-------------*/
.books {
clear: both;
padding: 10px;
min-height: 90px;
}
.cover {
.books .cover {
float:left;
margin: 0 10px 0 0;
min-width: 56px;
min-height: 70px;
margin: 4px 10px 4px 4px;
width: 60px;
height: 82px;
}
.bookpopup .cover {
float:left;
margin: 4px 10px 4px 4px;
width: 100px;
height: 150px;
}
.cover img {
max-width:100%;
max-height:100%;
}
.download {
float: right;
line-height:40px;
text-align: right;
margin: 6px;
}
.download a {

View File

@ -192,21 +192,33 @@ max-width:800px;
/*-------------books article-------------*/
.books {
clear: both;
padding: 10px;
min-height: 90px;
}
.cover {
.books .cover {
float:left;
margin: 0 10px 0 0;
min-width: 56px;
min-height: 70px;
margin: 4px 10px 4px 4px;
width: 60px;
height: 82px;
}
.bookpopup .cover {
float:left;
margin: 4px 10px 4px 4px;
width: 100px;
height: 150px;
}
.cover img {
max-width:100%;
max-height:100%;
}
.download {
float: right;
line-height:40px;
text-align: right;
margin: 6px;
}
.download a {