mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-12 04:41:06 +08:00
DOC: tweak image sizes in gallery.
If images are limited to 8-inch widths and the figure dpi is 100, 1/4 scale thumbnails will be 200px wide.
This commit is contained in:
+1
-22
@@ -114,27 +114,6 @@ def generate_example_rst(app):
|
||||
fhindex = file(os.path.join(root_dir, 'index.txt'), 'w')
|
||||
fhindex.write("""\
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<style type="text/css">
|
||||
.figure {
|
||||
float: left;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.figure img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.figure .caption {
|
||||
width: 200px;
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Examples
|
||||
========
|
||||
|
||||
@@ -280,7 +259,7 @@ def generate_file_rst(fname, target_dir, src_dir, plot_gallery):
|
||||
this_template = plot_rst_template
|
||||
from matplotlib import image
|
||||
if os.path.exists(first_image_file):
|
||||
image.thumbnail(first_image_file, thumb_file, 0.2)
|
||||
image.thumbnail(first_image_file, thumb_file, 0.25)
|
||||
|
||||
if not os.path.exists(thumb_file):
|
||||
# create something not to replace the thumbnail
|
||||
|
||||
@@ -362,6 +362,23 @@ div.footer, div.footer a {
|
||||
color: #888a85;
|
||||
}
|
||||
|
||||
.figure {
|
||||
float: left;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.figure img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-height: 150px;
|
||||
}
|
||||
|
||||
.figure .caption {
|
||||
width: 200px;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
|
||||
/* Styles copied from basic theme */
|
||||
|
||||
@@ -653,7 +670,7 @@ th {
|
||||
/* ----------------- Example Gallery ----------------- */
|
||||
|
||||
.gallery {
|
||||
min-height: 250px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.gallery p.caption a{
|
||||
|
||||
Reference in New Issue
Block a user