2

I am suffering a strange effect: if I try to \includegraphics two .jpeg files with the same properties, they are rendered with different sizes (almost thumbnail vs. actual size) Since this happens at random for a collection of files, I am stuck. I am not sure what I need to check.

 \documentclass[titlepage,a4paper,12pt]{article}
 \usepackage[OT2,T1]{fontenc}  
 \usepackage[utf8]{inputenc} 
 \usepackage{lmodern}         
 \usepackage{graphicx}
 \usepackage[american,russian,italian]{babel}
 \usepackage[babel,italian=guillemets]{csquotes}
 \author{mario  \\ versione 0.1}
   \title{TEST}
   \date{\today}
   \begin{document}
   \maketitle
   \begin{center}
%%\includegraphics[scale=0.225]{img/DSC_0060.JPG}
  \includegraphics[scale=1]{img/DSC_0060.JPG}
  \end{center}

  \begin{center}
%%\includegraphics[scale=0.225]{img/DSC_0174.JPG}
  \includegraphics[scale=1]{img/DSC_0174.JPG}
  \end{center}
\end{document}

enter image description here enter image description here

from myfile.log, compare Requested size, why is 481.79881pt x 724.62543pt vs. 2007.49512pt x 3019.27267pt?

 <img/DSC_0060.JPG, id=8, 481.8pt x 724.6272pt>
 File: img/DSC_0060.JPG Graphic file (type jpg)
 <use img/DSC_0060.JPG>
 Package pdftex.def Info: img/DSC_0060.JPG used on input line 22.
 (pdftex.def)             Requested size: 481.79881pt x 724.62543pt.

 Overfull \hbox (91.79881pt too wide) in paragraph at lines 22--23
 [] 
 []

 [1]
 Overfull \vbox (132.62543pt too high) has occurred while \output is   active []
[2 <./img/DSC_0060.JPG>] <img/DSC_0174.JPG, id=15, 2007.5pt x 3019.28pt>
File: img/DSC_0174.JPG Graphic file (type jpg)
<use img/DSC_0174.JPG>
Package pdftex.def Info: img/DSC_0174.JPG used on input line 27.
(pdftex.def)             Requested size: 2007.49512pt x 3019.27267pt.  

Overfull \hbox (1617.49512pt too wide) in paragraph at lines 27--28
[] 
[]

[3]
Overfull \vbox (2427.27267pt too high) has occurred while \output is active [] [4 <./img/DSC_0174.JPG>]

EDIT the first answer here fixes my code nicely (thanks!), but do not address the issue above.

MORE INFO identify -verbose DSC_0060.JPG

Image: DSC_0060.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 2000x3008+0+0
Resolution: 300x300
Print size: 6.66667x10.0267
Units: PixelsPerInch
Type: TrueColor
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
Channel statistics:
    Pixels: 6016000
    Red:
        min: 0 (0)
        max: 215 (0.843137)
        mean: 146.208 (0.573363)
        standard deviation: 21.9552 (0.0860987)
        kurtosis: 12.2775
        skewness: -3.30986
        entropy: 0.717243
    Green:
        min: 0 (0)
        max: 202 (0.792157)
        mean: 149.219 (0.585171)
        standard deviation: 25.7637 (0.101034)
        kurtosis: 7.73389
        skewness: -2.47053
        entropy: 0.798522
    Blue:
        min: 0 (0)
        max: 209 (0.819608)
        mean: 154.539 (0.606037)
        standard deviation: 31.2284 (0.122464)
        kurtosis: 2.85164
        skewness: -1.37373
        entropy: 0.851679
Image statistics:
    Overall:
        min: 0 (0)
        max: 215 (0.843137)
        mean: 149.989 (0.588191)
        standard deviation: 26.5895 (0.104273)
        kurtosis: 6.27469
        skewness: -1.99941
        entropy: 0.789148
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2000x3008+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 77
Orientation: TopLeft
Properties:
    date:create: 2016-08-04T14:14:24+02:00
    date:modify: 2010-01-07T23:36:18+01:00
    exif:ColorSpace: 1
    exif:ComponentsConfiguration: 1, 2, 3, 0
    exif:ExifImageLength: 3008
    exif:ExifImageWidth: 2000
    exif:ExifOffset: 102
    exif:ExifVersion: 48, 50, 50, 48
    exif:FlashPixVersion: 48, 49, 48, 48
    exif:InteroperabilityOffset: 204
    exif:MakerNote: 78, 105, 107, 111, 110, 0, 2, 0, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 5, 0, 1, 0, 7, 0, 4, 0, 0, 0, 48, 50, 49, 48, 17, 0, 4, 0, 1, 0, 0, 0, 74, 0, 0, 0, 9, 14, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 14, 4, 0, 1, 0, 0, 0, 168, 0, 0, 0, 25, 14, 3, 0, 2, 0, 0, 0, 0, 1, 60, 0
    exif:Orientation: 1
    exif:ResolutionUnit: 2
    exif:thumbnail:Compression: 6
    exif:thumbnail:InteroperabilityIndex: R98
    exif:thumbnail:InteroperabilityVersion: 0, 1, 0, 0
    exif:thumbnail:JPEGInterchangeFormat: 512
    exif:thumbnail:JPEGInterchangeFormatLength: 1091
    exif:thumbnail:ResolutionUnit: 2
    exif:thumbnail:XResolution: 300/1
    exif:thumbnail:YResolution: 300/1
    exif:XResolution: 300/1
    exif:YCbCrPositioning: 1
    exif:YResolution: 300/1
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x1,1x1,1x1
    signature: 6d09810169e82c194b94f8db983a84e558d441971ad4031bc54b69cc33a2523a
Profiles:
    Profile-exif: 15258 bytes
Artifacts:
    filename: DSC_0060.JPG
    verbose: true
Tainted: False
Filesize: 702KB
Number pixels: 6.016M
Pixels per second: 1.504TB
User time: 0.000u
Elapsed time: 0:01.000
Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-12-06 http://www.imagemagick.org

MORE INFO identify -verbose DSC_0174.JPG

Image: DSC_0174.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 2000x3008+0+0
Resolution: 300x300
Print size: 6.66667x10.0267
Units: PixelsPerInch
Type: TrueColor
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
Channel statistics:
    Pixels: 6016000
    Red:
        min: 0 (0)
        max: 225 (0.882353)
        mean: 144.882 (0.568164)
        standard deviation: 14.0253 (0.055001)
        kurtosis: 25.4054
        skewness: -4.05491
        entropy: 0.67539
    Green:
        min: 0 (0)
        max: 241 (0.945098)
        mean: 147.549 (0.578623)
        standard deviation: 17.5731 (0.0689142)
        kurtosis: 13.703
        skewness: -2.84547
        entropy: 0.730962
    Blue:
        min: 0 (0)
        max: 255 (1)
        mean: 154.287 (0.605049)
        standard deviation: 23.1208 (0.0906698)
        kurtosis: 3.88739
        skewness: -1.3269
        entropy: 0.7888
Image statistics:
    Overall:
        min: 0 (0)
        max: 255 (1)
        mean: 148.906 (0.583945)
        standard deviation: 18.6198 (0.0730189)
        kurtosis: 9.99953
        skewness: -1.95921
        entropy: 0.731718
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2000x3008+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 77
Orientation: TopLeft
Properties:
    date:create: 2016-08-04T14:14:24+02:00
    date:modify: 2013-06-28T12:21:22+02:00
    exif:ColorSpace: 1
    exif:ComponentsConfiguration: 1, 2, 3, 0
    exif:ExifImageLength: 2000
    exif:ExifImageWidth: 3008
    exif:ExifOffset: 102
    exif:ExifVersion: 48, 50, 50, 48
    exif:FlashPixVersion: 48, 49, 48, 48
    exif:InteroperabilityOffset: 284
    exif:MakerNote: 78, 105, 107, 111, 110, 0, 2, 0, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 5, 0, 1, 0, 7, 0, 4, 0, 0, 0, 48, 50, 49, 48, 17, 0, 4, 0, 1, 0, 0, 0, 74, 0, 0, 0, 9, 14, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 14, 4, 0, 1, 0, 0, 0, 168, 0, 0, 0, 25, 14, 3, 0, 2, 0, 0, 0, 0, 1, 60, 0
    exif:Orientation: 1
    exif:ResolutionUnit: 2
    exif:thumbnail:Compression: 6
    exif:thumbnail:InteroperabilityIndex: R98
    exif:thumbnail:InteroperabilityVersion: 0, 1, 0, 0
    exif:thumbnail:JPEGInterchangeFormat: 408
    exif:thumbnail:JPEGInterchangeFormatLength: 2454
    exif:thumbnail:ResolutionUnit: 2
    exif:thumbnail:XResolution: 300/1
    exif:thumbnail:YResolution: 300/1
    exif:XResolution: 300/1
    exif:YCbCrPositioning: 1
    exif:YResolution: 300/1
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x2,1x1,1x1
    signature: c3f1569485cf0cd8522e5648f95bcd85ae41f1fd24c703d4815aeccfa4699c07
Profiles:
    Profile-exif: 2868 bytes
Artifacts:
    filename: DSC_0174.JPG
    verbose: true
Tainted: False
Filesize: 619KB
Number pixels: 6.016M
Pixels per second: 1.2032TB
User time: 0.000u
Elapsed time: 0:01.000
Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-12-06 http://www.imagemagick.org

identify -verbose A174.JPG

Image: A174.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 2000x3008+0+0
Resolution: 300x300
Print size: 6.66667x10.0267
Units: Unrecognized
Type: TrueColor
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
Channel statistics:
    Pixels: 6016000
    Red:
        min: 0 (0)
        max: 216 (0.847059)
        mean: 146.219 (0.573408)
        standard deviation: 21.9196 (0.0859591)
        kurtosis: 12.2549
        skewness: -3.30845
        entropy: 0.716068
    Green:
        min: 0 (0)
        max: 202 (0.792157)
        mean: 149.145 (0.584883)
        standard deviation: 25.7205 (0.100865)
        kurtosis: 7.70369
        skewness: -2.46456
        entropy: 0.797841
    Blue:
        min: 0 (0)
        max: 209 (0.819608)
        mean: 154.81 (0.607099)
        standard deviation: 31.3309 (0.122866)
        kurtosis: 2.80184
        skewness: -1.3623
        entropy: 0.852083
Image statistics:
    Overall:
        min: 0 (0)
        max: 216 (0.847059)
        mean: 150.058 (0.588463)
        standard deviation: 26.606 (0.104337)
        kurtosis: 6.22509
        skewness: -1.98185
        entropy: 0.788664
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: JPEG
Intensity: Undefined
Compose: Over
Page geometry: 2000x3008+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 90
Orientation: Undefined
Properties:
    date:create: 2016-08-04T16:15:46+02:00
    date:modify: 2016-08-04T16:15:46+02:00
    exif:ColorSpace: sRGB
    exif:ComponentsConfiguration: 1, 2, 3, 0
    exif:Compression: JPEG compression
    exif:ExifImageLength: 3008
    exif:ExifImageWidth: 2000
    exif:ExifOffset: 102
    exif:ExifVersion: Exif Version 2.2
    exif:FlashPixVersion: FlashPix Version 1.0
    exif:InteroperabilityIndex: R98
    exif:InteroperabilityOffset: 288
    exif:MakerNote: 84 bytes undefined data
    exif:Orientation: Top-left
    exif:PixelXDimension: 2000
    exif:PixelYDimension: 3008
    exif:ResolutionUnit: Inch
    exif:thumbnail:Compression: 6
    exif:thumbnail:InteroperabilityIndex: R98
    exif:thumbnail:InteroperabilityVersion: 0, 1, 0, 0
    exif:thumbnail:JPEGInterchangeFormat: 412
    exif:thumbnail:JPEGInterchangeFormatLength: 4578
    exif:thumbnail:ResolutionUnit: 2
    exif:thumbnail:XResolution: 300/1
    exif:thumbnail:YResolution: 300/1
    exif:XResolution: 300
    exif:YCbCrPositioning: Centered
    exif:YResolution: 300
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: dcec435a0ac186e8c08a5567ecbce4f1d0eae42f62edd0c823600a939e11d164
Profiles:
    Profile-exif: 4996 bytes
    Profile-xmp: 1271 bytes
Artifacts:
    filename: A174.JPG
    verbose: true
Tainted: False
Filesize: 883KB
Number pixels: 6.016M
Pixels per second: 668.44GB
User time: 0.000u
Elapsed time: 0:01.000
Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-12-06 http://www.imagemagick.org

Seen properties by ImageViewer

  • Does this still happen if you swap the order of the files? – Jake Aug 4 '16 at 11:09
  • @jake Yes! No change. – mario Aug 4 '16 at 13:03
  • So it's still the same image that gets scaled down (DSC_0060.JPG)? Could you make the two pictures available? – Jake Aug 4 '16 at 13:06
  • @jake, Yes, the same image. No, they are (photo) pictures of private letters. Let me know what would you check of them (besides their properties by GIMP as above) – mario Aug 4 '16 at 13:23
  • 1
    I'm not sure yet what's going on, but it's interesting that in DSC_0174.JPG, the resolution stated in the Geometry: 2000x3008+0+0 line doesn't match the one in exif:ExifImageLength: 2000 and exif:ExifImageWidth: 3008. Could you also include the output of identify -v on the newly saved versions? Also, instead of opening/saving all the images in GIMP, you could simply use Imagemagick's mogrify -path mydirectory * to the same effect (hopefully). – Jake Aug 4 '16 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.