Code Duplication    Length = 11-11 lines in 2 locations

typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php 1 location

@@ 179-189 (lines=11) @@
176
            $params = $gifBuilder->cmds['jpg'];
177
178
            // Cropscaling:
179
            if ($data['crs']) {
180
                if (!$data['origW']) {
181
                    $data['origW'] = $data[0];
182
                }
183
                if (!$data['origH']) {
184
                    $data['origH'] = $data[1];
185
                }
186
                $offsetX = (int)(($data[0] - $data['origW']) * ($data['cropH'] + 100) / 200);
187
                $offsetY = (int)(($data[1] - $data['origH']) * ($data['cropV'] + 100) / 200);
188
                $params .= ' -crop ' . $data['origW'] . 'x' . $data['origH'] . '+' . $offsetX . '+' . $offsetY . '! ';
189
            }
190
            $command = $gifBuilder->scalecmd . ' ' . $info[0] . 'x' . $info[1] . '! ' . $params . ' ';
191
            $gifBuilder->imageMagickExec($originalFileName, $temporaryFileName, $command, $frame);
192
        }

typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php 1 location

@@ 2112-2122 (lines=11) @@
2109
            $params = $this->cmds[$newExt];
2110
        }
2111
        // Cropscaling:
2112
        if ($data['crs']) {
2113
            if (!$data['origW']) {
2114
                $data['origW'] = $data[0];
2115
            }
2116
            if (!$data['origH']) {
2117
                $data['origH'] = $data[1];
2118
            }
2119
            $offsetX = (int)(($data[0] - $data['origW']) * ($data['cropH'] + 100) / 200);
2120
            $offsetY = (int)(($data[1] - $data['origH']) * ($data['cropV'] + 100) / 200);
2121
            $params .= ' -crop ' . $data['origW'] . 'x' . $data['origH'] . '+' . $offsetX . '+' . $offsetY . '! ';
2122
        }
2123
        $command = $this->scalecmd . ' ' . $info[0] . 'x' . $info[1] . '! ' . $params . ' ';
2124
        $cropscale = $data['crs'] ? 'crs-V' . $data['cropV'] . 'H' . $data['cropH'] : '';
2125
        if ($this->alternativeOutputKey) {