(ImageProcessor ip)
| 315 | } |
| 316 | |
| 317 | FHT newFHT(ImageProcessor ip) { |
| 318 | FHT fht; |
| 319 | if (ip instanceof ColorProcessor) { |
| 320 | showStatus("Extracting brightness"); |
| 321 | ImageProcessor ip2 = ((ColorProcessor)ip).getBrightness(); |
| 322 | fht = new FHT(pad(ip2)); |
| 323 | fht.rgb = (ColorProcessor)ip.duplicate(); // save so we can later update the brightness |
| 324 | } else |
| 325 | fht = new FHT(pad(ip)); |
| 326 | if (padded) { |
| 327 | fht.originalWidth = originalWidth; |
| 328 | fht.originalHeight = originalHeight; |
| 329 | } |
| 330 | int bitDepth = imp.getBitDepth(); |
| 331 | fht.originalBitDepth = bitDepth; |
| 332 | if (bitDepth!=24) |
| 333 | fht.originalColorModel = ip.getColorModel(); |
| 334 | return fht; |
| 335 | } |
| 336 | |
| 337 | ImageProcessor pad(ImageProcessor ip) { |
| 338 | originalWidth = ip.getWidth(); |
no test coverage detected