|
|
@ -3,8 +3,8 @@ package com.fr.design.utils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.frpx.util.ImageIOHelper; |
|
|
|
import com.fr.base.frpx.util.ImageIOHelper; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.FRLogger; |
|
|
|
|
|
|
|
import com.fr.general.ImageWithSuffix; |
|
|
|
import com.fr.general.ImageWithSuffix; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.stable.CoreGraphHelper; |
|
|
|
import com.fr.stable.CoreGraphHelper; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
@ -54,7 +54,7 @@ public class ImageUtils { |
|
|
|
return scale(srcImg, 0.5f, true); |
|
|
|
return scale(srcImg, 0.5f, true); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
FRLogger.getLogger().info("image compress failed!"); |
|
|
|
FineLoggerFactory.getLogger().info("image compress failed!"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return BaseUtils.readImage(imageFile.getPath()); |
|
|
|
return BaseUtils.readImage(imageFile.getPath()); |
|
|
@ -81,7 +81,7 @@ public class ImageUtils { |
|
|
|
desImg = scale(srcImg, 0.5f, true); |
|
|
|
desImg = scale(srcImg, 0.5f, true); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
FRLogger.getLogger().info("image compress failed!"); |
|
|
|
FineLoggerFactory.getLogger().info("image compress failed!"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return new ImageWithSuffix(desImg, TYPE_PNG); |
|
|
|
return new ImageWithSuffix(desImg, TYPE_PNG); |
|
|
|