Below is the jpegtran command to find out the Horizontal and Vertical sampling factors in a JPEG file: jpegtran -verbose -crop 0x0+0+0 crop.jpg del.jpg You can download jpegtran.exe for Windows from http://jpegclub.org/jpegtran/ You can see the sampling factors in the following section of the debug output: Start Of Frame 0xc0: width=96, height=848, components=3 Component 1: 2hx1v q=0 Component 2: 1hx1v q=1 Component 3: 1hx1v q=1 From the above note that the sampling factor for Component 1 is H: 2, V: 1 However MetaData.java using the metadata-extractor library gives it as H: 1, V:2 as in the below output: Got Tag Type: 6, name: Component 1, desc: Y component: Quantization table 0, Sampling factors 1 horiz/2 vert, dirName: JPEG Got Tag Type: 7, name: Component 2, desc: Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert, dirName: JPEG Got Tag Type: 8, name: Component 3, desc: Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert, dirName: JPEG JPEG Image Dim = 96x848 JPEG Comp 1 = Y component: Quantization table 0, Sampling factors 1 horiz/2 vert Horiz = 1, vert = 2