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:
parent
2d0449e1d2
commit
e840d4cf70
2
book.php
2
book.php
|
@ -144,7 +144,7 @@ class Book extends Base {
|
||||||
$out = $this->getContentArray ();
|
$out = $this->getContentArray ();
|
||||||
|
|
||||||
$out ["coverurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)->hrefXhtml ();
|
$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 ["content"] = $this->getComment (false);
|
||||||
$out ["datas"] = array ();
|
$out ["datas"] = array ();
|
||||||
$dataKindle = $this->GetMostInterestingDataToSendToKindle ();
|
$dataKindle = $this->GetMostInterestingDataToSendToKindle ();
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
/*
|
/*
|
||||||
* Height of thumbnail image for HTML
|
* 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
|
* Icon for both OPDS and HTML catalog
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
$src_img = imagecreatefromjpeg($file);
|
$src_img = imagecreatefromjpeg($file);
|
||||||
$dst_img = imagecreatetruecolor($nw,$nh);
|
$dst_img = imagecreatetruecolor($nw,$nh);
|
||||||
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nw, $nh, $w, $h);//resizing the image
|
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($src_img);
|
||||||
imagedestroy($dst_img);
|
imagedestroy($dst_img);
|
||||||
return;
|
return;
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
$src_img = imagecreatefromjpeg($file);
|
$src_img = imagecreatefromjpeg($file);
|
||||||
$dst_img = imagecreatetruecolor($nw,$nh);
|
$dst_img = imagecreatetruecolor($nw,$nh);
|
||||||
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nw, $nh, $w, $h);//resizing the image
|
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($src_img);
|
||||||
imagedestroy($dst_img);
|
imagedestroy($dst_img);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -175,21 +175,33 @@ max-width:800px;
|
||||||
/*-------------books article-------------*/
|
/*-------------books article-------------*/
|
||||||
.books {
|
.books {
|
||||||
clear: both;
|
clear: both;
|
||||||
padding: 10px;
|
|
||||||
min-height: 90px;
|
min-height: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover {
|
.books .cover {
|
||||||
float:left;
|
float:left;
|
||||||
margin: 0 10px 0 0;
|
margin: 4px 10px 4px 4px;
|
||||||
min-width: 56px;
|
width: 60px;
|
||||||
min-height: 70px;
|
height: 82px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bookpopup .cover {
|
||||||
|
float:left;
|
||||||
|
margin: 4px 10px 4px 4px;
|
||||||
|
width: 100px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover img {
|
||||||
|
max-width:100%;
|
||||||
|
max-height:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download {
|
.download {
|
||||||
float: right;
|
float: right;
|
||||||
line-height:40px;
|
line-height:40px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
margin: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download a {
|
.download a {
|
||||||
|
|
|
@ -192,21 +192,33 @@ max-width:800px;
|
||||||
/*-------------books article-------------*/
|
/*-------------books article-------------*/
|
||||||
.books {
|
.books {
|
||||||
clear: both;
|
clear: both;
|
||||||
padding: 10px;
|
|
||||||
min-height: 90px;
|
min-height: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover {
|
.books .cover {
|
||||||
float:left;
|
float:left;
|
||||||
margin: 0 10px 0 0;
|
margin: 4px 10px 4px 4px;
|
||||||
min-width: 56px;
|
width: 60px;
|
||||||
min-height: 70px;
|
height: 82px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bookpopup .cover {
|
||||||
|
float:left;
|
||||||
|
margin: 4px 10px 4px 4px;
|
||||||
|
width: 100px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover img {
|
||||||
|
max-width:100%;
|
||||||
|
max-height:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download {
|
.download {
|
||||||
float: right;
|
float: right;
|
||||||
line-height:40px;
|
line-height:40px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
margin: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download a {
|
.download a {
|
||||||
|
|
Loading…
Reference in a new issue