Can't add some images as resources and post them to CTDN
Can't add some images as resources and post them to CTDN
01 Feb 2021, 21:00
Hello Panagiotis,
I'm posting this issue I had with ctdn while posting a code with an image resource, apparently, it says:
I have solved it by uploading an image file much smaller, from 1800px wide to about 400px wide, this is a solution for me, but maybe you need to check this issue, here's the code:
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using cAlgo.Properties;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class SampleAddImageAsResource : Indicator
{
protected override void Initialize()
{
var image1 = new Image
{
Source = Resources.logo_white_background_resized_to_1800px,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
};
Chart.AddControl(image1);
}
public override void Calculate(int index)
{
// Calculate value at specified index
// Result[index] = ...
}
}
}
The image has the following properties
Regards,
Xavier
Replies
algocorner
05 Feb 2021, 19:31
RE:
Hello Panagiotis,
I have sent it a couple of days ago, thank you
PanagiotisCharalampous said:
Hi Xavier,
Can you send me the actual .algo file to community@spotware.com so that I can check?
Best Regards,
Panagiotis
@algocorner
PanagiotisCharalampous
02 Feb 2021, 08:47
Hi Xavier,
Can you send me the actual .algo file to community@spotware.com so that I can check?
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous