- 博客(0)
- 资源 (12)
- 问答 (1)
- 收藏
- 关注
sanselan-0.97
个人使用场景:识别图片是否cmyk,我的另外一个资源是把图片从rgb转成cmyk
public boolean judgeImgFormatIfCmyk() {
boolean back = false;
try {
org.apache.sanselan.ImageInfo img = Sanselan.getImageInfo(file);
if(img.getColorType() == org.apache.sanselan.ImageInfo.COLOR_TYPE_CMYK) {
//这家伙是cmyk模式滴
back = true;
}
} catch (ImageReadException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return back;
}
2020-05-29
ISO_v2_300_eci.zip
个人用到的场景:rgb图片转cmyk
public String rgbToCmyk(String destpath,String extend) {
String back = "Y";
try {
BufferedImage rgbImage = ImageIO.read(file);
BufferedImage cmykImage = null;
// InputStream input = new FileInputStream(new File("C:/Users/lenovo/Desktop/ISOcoated_v2_300_eci.icc"));
// ColorSpace cpace = new ICC_ColorSpace(ICC_Profile.getInstance(input));
ColorSpace cpace = new ICC_ColorSpace(ICC_Profile.getInstance(ThumbnailatorImageUtil.class.getClassLoader().getResourceAsStream("ISOcoated_v2_300_eci.icc")));
ColorConvertOp op = new ColorConvertOp(rgbImage.getColorModel().getColorSpace(), cpace, null);
cmykImage = op.filter(rgbImage, null);
JAI.create("filestore", cmykImage, destpath, "TIFF");
System.out.println("-------rgbToCmyk完成------");
} catch (IOException e) {
e.printStackTrace();
}
return back;
}
public static void main(String[] args) {
ThumbnailatorImageUtil img = new ThumbnailatorImageUtil("C:\\Users\\lenovo\\Desktop\\1.jpg");
img.rgbToCmyk("C:\\Users\\lenovo\\Desktop\\22.jpg","");
//img.compressToDefineSize("C:\\Users\\lenovo\\Desktop\\2.jpg", 2048,0.99);
}
2020-05-29
GetImgExtraInfo.java
介绍了两种方式获取图片的拓展信息,简单获取可以使用ImageInfo,获取更多内容信息可以使用JpegMetadataReader.readMetadata(jpegFile)
简单获取结果
Format Details: Jpeg/DCM
Bits Per Pixel: 24
Comments: 0
Format: JPEG
Format Name: JPEG (Joint Photographic Experts Group) Format
Compression Algorithm: JPEG
Height: 2670
MimeType: image/jpeg
Number Of Images: 1
Physical Height Dpi: 300
Physical Height Inch: 8.9
Physical Width Dpi: 300
Physical Width Inch: 13.333333
Width: 4000
Is Progressive: false
Is Transparent: false
Color Type: YCbCr
Uses Palette: false
复杂:
Compression Type=Baseline
Data Precision=8 bits
Image Height=2670 pixels
Image Width=4000 pixels
Number of Components=3
Component 1=Y component: Quantization table 0, Sampling factors 1 horiz/1 vert
Component 2=Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert
Component 3=Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert
Image Width=7360 pixels
Image Height=4912 pixels
Bits Per Sample=8 8 8 bits/component/pixel
Photometric Interpretation=RGB
Make=NIKON CORPORATION
Model=NIKON D800E
Orientation=Top, left side (Horizontal / normal)
Samples Per Pixel=3 samples/pixel
X Resolution=300 dots per inch
Y Resolution=300 dots per inch
Resolution Unit=Inch
Software=Adobe Photoshop CC 2017 (Windows)
Date/Time=2019:05:23 15:55:17
YCbCr Positioning=Datum point
Sensitivity Type=Recommended Exposure Index
Exposure Time=1/125 sec
F-Number=f/25.0
Exposure Program=Manual control
ISO Speed Ratings=100
Sensitivity Type=Recommended Exposure Index
Exif Version=2.30
Date/Time Original=2014:05:21 15:38:57
Date/Time Digitized=2014:05:21 15:38:57
Components Configuration=YCbCr
Compressed Bits Per Pixel=2 bits/pixel
Shutter Speed Value=1/124 sec
Aperture Value=f/25.0
Exposure Bias Value=0 EV
Max Aperture Value=f/2.8
Metering Mode=Multi-segment
White Balance=Unknown
Flash=Flash did not fire, auto
Focal Length=60 mm
User Comment=
Sub-Sec Time=00
Sub-Sec Time Original=00
Sub-Sec Time Digitized=00
FlashPix Version=1.00
Color Space=sRGB
Exif Image Width=4000 pixels
Exif Image Height=2670 pixels
Sensing Method=One-chip color area sensor
File Source=Digital Still Camera (DSC)
Scene Type=Directly photographed image
CFA Pattern=[Red,Green][Green,Blue]
Custom Rendered=Normal process
Exposure Mode=Manual exposure
White Balance Mode=Manual white balance
Digital Zoom Ratio=1
Focal Length 35=60 mm
Scene Capture Type=Standard
Gain Control=None
Contrast=None
Saturation=None
Sharpness=None
Subject Distance Range=Unknown
Unknown tag (0xea1d)=0
Interoperability Index=Recommended Exif Interoperability Rules (ExifR98)
Interoperability Version=1.00
GPS Version ID=2.300
Compression=JPEG (old-style)
X Resolution=72 dots per inch
Y Resolution=72 dots per inch
Resolution Unit=Inch
Thumbnail Offset=1186 bytes
Thumbnail Length=5555 bytes
XMP Value Count=29
Profile Size=3144
CMM Type=Lino
Version=2.1.0
Class=Display Device
Color space=RGB
Profile Connection Space=XYZ
Profile Date/Time=1998:02:09 06:49:00
Signature=acsp
Primary Platform=Microsoft Corporation
Device manufacturer=IEC
Device model=sRGB
XYZ values=0.964 1 0.825
Tag Count=17
Copyright=Copyright (c) 1998 Hewlett-Packard Company
Profile Description=sRGB IEC61966-2.1
Media White Point=(0.9505, 1, 1.0891)
Media Black Point=(0, 0, 0)
Red Colorant=(0.4361, 0.2225, 0.0139)
Green Colorant=(0.3851, 0.7169, 0.0971)
Blue Colorant=(0.1431, 0.0606, 0.7141)
Device Mfg Description=IEC http://www.iec.ch
Device Model Description=IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Conditions Description=Reference Viewing Condition in IEC61966-2.1
Viewing Conditions=view (0x76696577): 36 bytes
Luminance=(76.0365, 80, 87.1246)
Measurement=1931 2° Observer, Backing (0, 0, 0), Geometry Unknown, Flare 1%, Illuminant D65
Technology=CRT
Red TRC=0.0, 0.0000763, 0.0001526, 0.0002289, 0.0003052, 0.0003815, 0.0004578, 0.0005341, 0.0006104, 0.0006867, 0.000763, 0.0008392, 0.0009003, 0.0009766, 0.0010529, 0.0011292, 0.0012055, 0.0012818, 0.0013581, 0.0014343, 0.0015106, 0.0015869, 0.0016632, 0.0017395, 0.0018158, 0.0018921, 0.0019684, 0.0020447, 0.002121, 0.0021973, 0.0022736, 0.0023499, 0.0024262, 0.0025025, 0.0025788, 0.0026551, 0.0027161, 0.0027924, 0.0028687, 0.002945, 0.0030213, 0.0030976, 0.0031739, 0.0032502, 0.0033417, 0.003418, 0.0034943, 0.0035859, 0.0036622, 0.0037537, 0.00383, 0.0039216, 0.0040131, 0.0041047, 0.0041962, 0.0042878, 0.0043793, 0.0044709, 0.0045624, 0.0046693, 0.0047608, 0.0048524, 0.0049592, 0.005066, 0.0051575, 0.0052644, 0.0053712, 0.005478, 0.0055848, 0.0056916, 0.0057984, 0.0059052, 0.0060273, 0.0061341, 0.0062562, 0.006363, 0.0064851, 0.0066072, 0.0067292, 0.0068513, 0.0069734, 0.0070954, 0.0072175, 0.0073396, 0.0074617, 0.007599, 0.0077211, 0.0078584, 0.0079957, 0.0081178, 0.0082551, 0.0083925, 0.0085298, 0.0086671, 0.0088045, 0.008957, 0.0090944, 0.0092317, 0.0093843, 0.0095369, 0.0096742, 0.0098268, 0.0099794, 0.010132, 0.0102846, 0.0104372, 0.0105898, 0.0107576, 0.0109102, 0.0110628, 0.0112306, 0.0113985, 0.0115511, 0.0117189, 0.0118868, 0.0120546, 0.0122
2020-03-29
search-guard-7-7.5.1-37.1.0.zip
基于Search Guard的Elasticsearch安全认证和授权配置组件资源,在官网是能够下载,不一定要下载我的,图方便的话可以下载这个,然后这个是我自己安装过程中一些步骤,也许对你有帮助http://www.myfamily.ink/tBNoteContentController.do?moduleAddView&moduleCode=FL020102&id=000000006f526daa016f53017d0f002b
2020-03-18
Elasticsearch组件elasticsearch-head-master
Elasticsearch组件elasticsearch-head-master,在官网也能下载的,只是速度相对慢而已,不缺C币的话就下载吧
2020-03-18
广播电视音像资料编目规范第2部分音频资料.pdf
实在是看不惯有些平台拿着国家发的标准在哪里赚积分和money,虽然官网不能下载但是也太黑了,一个文档居然要100刀,丢、、、这是我找到免费下载下来的,在这里也分享出来
2020-02-25
MySQL并Tomcat优化记录
max_connections = 1000
# MySQL的最大连接数,如果服务器的并发连接请求量比较大,建议调高此值,以增加并行连接数量,当然这建立在机器能支撑的情况下,因为如果连接数越多,
介于MySQL会为每个连接提供连接缓冲区,就会开销越多的内存,所以要适当调整该值,不能盲目提高设值。可以过'conn%'通配符查看当前状态的连接数量,以定夺该值的大小。
2017-09-13
MyEclipse 2014优化设置
1. 指定本机java环境
Windows-->preferences-->java-->Insetallel JREs
右侧 单击ADD standard VM-->Next -->Directory-->Finash
点选 新增jre环境-->点击OK
2. 更换背景颜色 个人感觉白色比较刺激眼睛 可选择性更换
Windows-->preferences-->General-->Editors-->Text Editors
右侧左下方 选中 Background color后, 单击 System default选项框后, 点击color 选择颜色后 -->OK
3. 取消servers中myeclipse自带的tomcat 开发中常常需要到相应的 tomcat目录中查看,
指定本机自带tomcat 可以更方便的操作
Windows-->preferences-->MyEclipse-->Servers-->Tomcat
根据个人选择指定tomcat目录 并点选上方的 radio Enable 选项-->OK
取消server中的tomcat
Windows-->preferences-->MyEclipse-->Servers-->Integrated Sandbox-->Myeclipse Tomcat 6 点击disable
2017-09-13
Free PDF Split pdf分割器
最近公司开发的一款应用使用PDF上传附件,这块做了超过200M的控制,很多老师反映他们的附件有不少超过200M,为此我整理这个文档,其中包含Free PDF Split pdf分割器 7.12 官方免费版安装文件,解压即可安装,内附安装说明书及简要的分割操作说明,其他更多的使用未曾涉及,还往大家一起补充
2016-07-12
BIRT报表如何实现批量打印
2017-01-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人