封装了黑白图片上色,风格转换和人像动漫化的百度api
This commit is contained in:
parent
da9af1fc2c
commit
605aa74845
BIN
external-resources/1_1730211646549_338.png
Normal file
BIN
external-resources/1_1730211646549_338.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
1
external-resources/1_1730211646549_338.txt
Normal file
1
external-resources/1_1730211646549_338.txt
Normal file
File diff suppressed because one or more lines are too long
BIN
external-resources/1_1730211646550_31.png
Normal file
BIN
external-resources/1_1730211646550_31.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 MiB |
1
external-resources/1_1730211646550_31.txt
Normal file
1
external-resources/1_1730211646550_31.txt
Normal file
File diff suppressed because one or more lines are too long
BIN
external-resources/1_1730211800988_936.png
Normal file
BIN
external-resources/1_1730211800988_936.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
1
external-resources/1_1730211800988_936.txt
Normal file
1
external-resources/1_1730211800988_936.txt
Normal file
File diff suppressed because one or more lines are too long
BIN
external-resources/1_1730211820384_324.png
Normal file
BIN
external-resources/1_1730211820384_324.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
1
external-resources/1_1730211820384_324.txt
Normal file
1
external-resources/1_1730211820384_324.txt
Normal file
File diff suppressed because one or more lines are too long
BIN
logs/2024-10/debug.2024-10-27.0.log.gz
Normal file
BIN
logs/2024-10/debug.2024-10-27.0.log.gz
Normal file
Binary file not shown.
BIN
logs/2024-10/debug.2024-10-28.0.log.gz
Normal file
BIN
logs/2024-10/debug.2024-10-28.0.log.gz
Normal file
Binary file not shown.
@ -236945,3 +236945,18 @@ Unconditional classes:
|
||||
2024-10-29 22:23:41,239 [XNIO-1 task-14] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] LogFormatUtils.java:91 - Writing [file [D:\学习\dc试验\master\external-resources\1_1730211820384_324.png]]
|
||||
2024-10-29 22:23:41,242 [XNIO-1 task-14] DEBUG [org.springframework.web.servlet.DispatcherServlet] FrameworkServlet.java:1130 - Completed 200 OK
|
||||
2024-10-29 22:24:41,295 [XNIO-1 I/O-11] DEBUG [io.undertow.request] ParseTimeoutUpdater.java:151 - Timing out idle connection from /127.0.0.1:51683
|
||||
2024-10-29 22:28:15,026 [Thread-18] DEBUG [o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext] AbstractApplicationContext.java:1002 - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@446293d, started on Tue Oct 29 22:15:42 CST 2024
|
||||
2024-10-29 22:28:15,027 [Thread-18] DEBUG [o.s.core.env.PropertySourcesPropertyResolver] PropertySourcesPropertyResolver.java:115 - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'systemProperties' with value of type String
|
||||
2024-10-29 22:28:15,028 [Thread-18] DEBUG [o.s.context.support.DefaultLifecycleProcessor] DefaultLifecycleProcessor.java:369 - Stopping beans in phase 2147483647
|
||||
2024-10-29 22:28:15,029 [Thread-18] DEBUG [o.s.context.support.DefaultLifecycleProcessor] DefaultLifecycleProcessor.java:242 - Bean 'documentationPluginsBootstrapper' completed its stop procedure
|
||||
2024-10-29 22:28:15,029 [Thread-18] INFO [o.s.scheduling.concurrent.ThreadPoolTaskScheduler] ExecutorConfigurationSupport.java:208 - Shutting down ExecutorService 'taskScheduler'
|
||||
2024-10-29 22:28:15,029 [Thread-18] DEBUG [o.s.d.redis.listener.RedisMessageListenerContainer] RedisMessageListenerContainer.java:229 - Stopped RedisMessageListenerContainer
|
||||
2024-10-29 22:28:15,030 [Thread-18] INFO [o.s.scheduling.concurrent.ThreadPoolTaskExecutor] ExecutorConfigurationSupport.java:208 - Shutting down ExecutorService 'taskExecutor'
|
||||
2024-10-29 22:28:15,030 [Thread-18] DEBUG [o.s.jmx.export.annotation.AnnotationMBeanExporter] MBeanExporter.java:451 - Unregistering JMX-exposed beans on shutdown
|
||||
2024-10-29 22:28:15,030 [Thread-18] DEBUG [o.s.jmx.export.annotation.AnnotationMBeanExporter] MBeanRegistrationSupport.java:185 - Unregistering JMX-exposed beans
|
||||
2024-10-29 22:28:15,034 [Thread-18] DEBUG [io.lettuce.core.RedisClient] AbstractRedisClient.java:437 - Initiate shutdown (100, 100, MILLISECONDS)
|
||||
2024-10-29 22:28:15,040 [Thread-18] DEBUG [io.lettuce.core.resource.DefaultClientResources] DefaultClientResources.java:601 - Initiate shutdown (0, 2, SECONDS)
|
||||
2024-10-29 22:28:15,041 [Thread-18] DEBUG [i.l.core.resource.DefaultEventLoopGroupProvider] DefaultEventLoopGroupProvider.java:202 - Initiate shutdown (0, 2, SECONDS)
|
||||
2024-10-29 22:28:15,047 [Thread-18] INFO [com.alibaba.druid.pool.DruidDataSource] DruidDataSource.java:2003 - {dataSource-0} closing ...
|
||||
2024-10-29 22:28:15,048 [Thread-18] INFO [io.undertow.servlet] ServletContextImpl.java:364 - Destroying Spring FrameworkServlet 'dispatcherServlet'
|
||||
2024-10-29 22:28:15,049 [Thread-18] DEBUG [io.undertow] Undertow.java:252 - stopping undertow server io.undertow.Undertow@3acc3ee
|
||||
|
@ -39,7 +39,6 @@ public class AiPictureController {
|
||||
public ResponseEntity<FileSystemResource> Colourize(@RequestParam("userid")Integer id, @RequestParam("image") MultipartFile image) throws Exception {
|
||||
String fileName= FileSetUtil.resetFileName(id,externalResourceDir,image);//生成的filename无后缀
|
||||
File file=FileSetUtil.saveFile(image,externalResourceDir,fileName);//生成的file为png文件
|
||||
System.out.println(fileName+"//////////"+externalResourceDir);
|
||||
String filePath=aiPictureService.Colourize(fileName,externalResourceDir);//转码传输到baiduapi后写入fileName+.txt,所返回的filePath直接指向对应txt文件
|
||||
aiPictureService.Base64ToImage(fileName,filePath,externalResourceDir);
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
33
target/classes/META-INF/spring-configuration-metadata.json
Normal file
33
target/classes/META-INF/spring-configuration-metadata.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"groups": [
|
||||
{
|
||||
"name": "external",
|
||||
"type": "com.message.Baidu_ai_API.config.ExternalResourceConfig",
|
||||
"sourceType": "com.message.Baidu_ai_API.config.ExternalResourceConfig"
|
||||
},
|
||||
{
|
||||
"name": "spring.datasource",
|
||||
"type": "javax.sql.DataSource",
|
||||
"sourceType": "com.message.config.DataSourceConfig",
|
||||
"sourceMethod": "druid()"
|
||||
},
|
||||
{
|
||||
"name": "userproperties",
|
||||
"type": "com.message.config.UserConfig",
|
||||
"sourceType": "com.message.config.UserConfig"
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"name": "external.resource-dir",
|
||||
"type": "java.lang.String",
|
||||
"sourceType": "com.message.Baidu_ai_API.config.ExternalResourceConfig"
|
||||
},
|
||||
{
|
||||
"name": "userproperties.updatepwdtime",
|
||||
"type": "java.lang.Long",
|
||||
"sourceType": "com.message.config.UserConfig"
|
||||
}
|
||||
],
|
||||
"hints": []
|
||||
}
|
BIN
target/classes/com/message/Baidu_ai_API/Enum/PicStyle.class
Normal file
BIN
target/classes/com/message/Baidu_ai_API/Enum/PicStyle.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/classes/com/message/Baidu_ai_API/util/Base64Util.class
Normal file
BIN
target/classes/com/message/Baidu_ai_API/util/Base64Util.class
Normal file
Binary file not shown.
BIN
target/classes/com/message/Baidu_ai_API/util/FileSetUtil.class
Normal file
BIN
target/classes/com/message/Baidu_ai_API/util/FileSetUtil.class
Normal file
Binary file not shown.
BIN
target/classes/com/message/Baidu_ai_API/util/FileUtil.class
Normal file
BIN
target/classes/com/message/Baidu_ai_API/util/FileUtil.class
Normal file
Binary file not shown.
BIN
target/classes/com/message/Baidu_ai_API/util/GsonUtils.class
Normal file
BIN
target/classes/com/message/Baidu_ai_API/util/GsonUtils.class
Normal file
Binary file not shown.
BIN
target/classes/com/message/Baidu_ai_API/util/HttpUtil.class
Normal file
BIN
target/classes/com/message/Baidu_ai_API/util/HttpUtil.class
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user