Comments (2)
I will check this ASAP when I have time, I'm still configuring the environment.
from awesome-cms-core.
public void RunImageProcessQueue()
{
var factory = new ConnectionFactory() { HostName = "localhost" };
using (var connection = factory.CreateConnection())
using (var channel = connection.CreateModel())
{
channel.QueueDeclare(queue: QueueName.ImageResizeProcessing.ToString(),
durable: true,
exclusive: false,
autoDelete: false,
arguments: null);
//Fair dispatch setup
channel.BasicQos(prefetchSize: 0, prefetchCount: 1, global: false);
Console.WriteLine(" [*] Waiting for messages.");
var consumer = new EventingBasicConsumer(channel);
consumer.Received += (model, ea) =>
{
var body = ea.Body;
var assetMessage = Encoding.UTF8.GetString(body);
Console.WriteLine(" [x] Received {0}", assetMessage);
var imageName = assetMessage.Split("\\")[1];
var s = ProjectPath.ToApplicationPath(imageName);
var assetPath = $"{ProjectPath.GetApplicationRoot()}\\wwwroot\\{assetMessage}";
var path = "D:\\SourceCode\\Awesome-CMS-Core\\src\\AwesomeCMSCore\\AwesomeCMSCore";
using (var image = Image.Load(path))
{
image.Mutate(x => x
.Resize(295, 205)
.Grayscale());
image.Save(imageName);
}
channel.BasicAck(deliveryTag: ea.DeliveryTag, multiple: false);
};
channel.BasicConsume(queue: QueueName.ImageResizeProcessing.ToString(),
autoAck: false,
consumer: consumer);
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();
}
Still can't resize eventhough I can load it
cc @AbelianKraun
from awesome-cms-core.
Related Issues (20)
- Error when navigate to localhost:5000 HOT 2
- Get image for index page
- Fix load wrong tag and categories
- Load PostOption in Client UI
- Upload image to google drive HOT 1
- Download image from google drive to resize then upload again
- Google Drive Feature
- Feature toggle setting
- automapper error when deploy to azure HOT 1
- Set enviroment URL for react app
- Display social profile settings in index page
- Social profile setting for admin
- Display user detail for index page
- Style social link
- Prevent social component call api 2 times
- Allow admin to edit user info in portal
- Unable to run application due HOT 5
- Getting 401 unauthorized every time HOT 1
- Getting ANCM Out-Of-Process Startup Failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-cms-core.