mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
improve blending error messages
This commit is contained in:
@@ -1132,7 +1132,9 @@ error:
|
|||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: 坐标混合重叠
|
coordinates for blending overlap: 坐标混合重叠
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1130,7 +1130,9 @@ error:
|
|||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: 坐標混合重疊
|
coordinates for blending overlap: 坐標混合重疊
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1156,7 +1156,9 @@ error:
|
|||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1048,7 +1048,8 @@ error:
|
|||||||
|
|
||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: Die Koordinaten für die Überblendung überlappen sich.
|
coordinates for blending overlap: Die Koordinaten für die Überblendung überlappen sich.
|
||||||
blending different sizes: Die für die Überblendung verwendeten Bilder müssen in der Funktion '%s' die gleiche Größe haben.
|
blending different sizes: Die für die Überblendung verwendeten Bilder müssen in der Funktion '%s' die gleiche Größe haben. (Eines ist %s, das andere ist %s)
|
||||||
|
blending different mask: Bild und Maske, die zum Überblenden verwendet werden, müssen in der Funktion '%s' die gleiche Größe haben. (Bild ist %s, Maske ist %s)
|
||||||
negative image width: Bild mit Breite Null oder negativer Breite, erstellt in der Funktion '%s'
|
negative image width: Bild mit Breite Null oder negativer Breite, erstellt in der Funktion '%s'
|
||||||
negative image height: Bild mit Höhe Null oder negativer Höhe, erstellt in der Funktion '%s'
|
negative image height: Bild mit Höhe Null oder negativer Höhe, erstellt in der Funktion '%s'
|
||||||
can't load image: Bild konnte nicht geladen werden. Stelle sicher, dass das tatsächliche Format des Bildes mit der gespeicherten Dateiendung übereinstimmt.
|
can't load image: Bild konnte nicht geladen werden. Stelle sicher, dass das tatsächliche Format des Bildes mit der gespeicherten Dateiendung übereinstimmt.
|
||||||
|
|||||||
@@ -1049,7 +1049,8 @@ error:
|
|||||||
|
|
||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
negative image height: Image with zero or negative height created in function '%s'
|
negative image height: Image with zero or negative height created in function '%s'
|
||||||
can't load image: Failed to load image. Ensure the image's actual format matches its saved extension.
|
can't load image: Failed to load image. Ensure the image's actual format matches its saved extension.
|
||||||
|
|||||||
@@ -1133,7 +1133,9 @@ error:
|
|||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: Coordenadas para la mezcla (blending) solapada
|
coordinates for blending overlap: Coordenadas para la mezcla (blending) solapada
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1048,7 +1048,8 @@ error:
|
|||||||
|
|
||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: Les coordonnées pour le mélange sont superposées. Espacez-les.
|
coordinates for blending overlap: Les coordonnées pour le mélange sont superposées. Espacez-les.
|
||||||
blending different sizes: Les images utilisées pour le mélange doivent avoir la même taille dans la fonction '%s'.
|
blending different sizes: Les images utilisées pour le mélange doivent avoir la même taille dans la fonction '%s'. (L'une est %s, l'autre est %s)
|
||||||
|
blending different mask: L'image et le masque utilisés pour le mélange doivent avoir la même taille dans la fonction '%s'. (L'image est %s, le masque est %s)
|
||||||
negative image width: Image de largeur nulle ou négative créée par la fonction '%s'
|
negative image width: Image de largeur nulle ou négative créée par la fonction '%s'
|
||||||
negative image height: Image de hauteur nulle ou négative créée par la fonction '%s'
|
negative image height: Image de hauteur nulle ou négative créée par la fonction '%s'
|
||||||
can't load image: Échec du chargement de l'image. Assurez-vous que le format réel de l'image corresponde à son extension enregistrée.
|
can't load image: Échec du chargement de l'image. Assurez-vous que le format réel de l'image corresponde à son extension enregistrée.
|
||||||
|
|||||||
@@ -1048,7 +1048,8 @@ error:
|
|||||||
|
|
||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: Le coordinate per la fusione si sovrappongono.
|
coordinates for blending overlap: Le coordinate per la fusione si sovrappongono.
|
||||||
blending different sizes: Le immagini utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'.
|
blending different sizes: Le immagini utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'. (Una è %s, l'altra è %s)
|
||||||
|
blending different mask: L'immagine e la maschera utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'. (L'immagine è %s, la maschera è %s)
|
||||||
negative image width: Immagine con larghezza zero o negativa creata nella funzione '%s'.
|
negative image width: Immagine con larghezza zero o negativa creata nella funzione '%s'.
|
||||||
negative image height: Immagine con altezza zero o negativa creata nella funzione '%s'.
|
negative image height: Immagine con altezza zero o negativa creata nella funzione '%s'.
|
||||||
can't load image: Impossibile caricare l'immagine. Assicurarsi che il formato effettivo dell'immagine corrisponda all'estensione salvata.
|
can't load image: Impossibile caricare l'immagine. Assicurarsi che il formato effettivo dell'immagine corrisponda all'estensione salvata.
|
||||||
|
|||||||
@@ -1133,7 +1133,9 @@ error:
|
|||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: オーバーラップを混ぜることのための座標
|
coordinates for blending overlap: オーバーラップを混ぜることのための座標
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1139,7 +1139,9 @@ error:
|
|||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: 블렌딩 오버랩을 위한 좌표
|
coordinates for blending overlap: 블렌딩 오버랩을 위한 좌표
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1189,7 +1189,9 @@ error:
|
|||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: Współrzędne scalania (blending) nachodzą na siebie
|
coordinates for blending overlap: Współrzędne scalania (blending) nachodzą na siebie
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -1049,7 +1049,8 @@ error:
|
|||||||
|
|
||||||
# image stuff
|
# image stuff
|
||||||
coordinates for blending overlap: As coordenadas para a mistura se sobrepõem.
|
coordinates for blending overlap: As coordenadas para a mistura se sobrepõem.
|
||||||
blending different sizes: As imagens usadas para mesclagem devem ter o mesmo tamanho na função '%s'.
|
blending different sizes: As imagens usadas para mesclagem devem ter o mesmo tamanho na função '%s'. (Uma é %s, a outra é %s)
|
||||||
|
blending different mask: A imagem e a máscara usadas para mesclagem devem ter o mesmo tamanho na função '%s' (Imagem é %s, máscara é %s)
|
||||||
negative image width: Imagem com largura zero ou negativa criada na função '%s'
|
negative image width: Imagem com largura zero ou negativa criada na função '%s'
|
||||||
negative image height: Imagem com altura zero ou negativa criada na função '%s'
|
negative image height: Imagem com altura zero ou negativa criada na função '%s'
|
||||||
can't load image: Falha ao carregar a imagem. Verifique se o formato real da imagem corresponde à extensão salva.
|
can't load image: Falha ao carregar a imagem. Verifique se o formato real da imagem corresponde à extensão salva.
|
||||||
|
|||||||
@@ -1184,7 +1184,9 @@ error:
|
|||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s)
|
||||||
|
#TODO: Localize
|
||||||
|
blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s)
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
negative image width: Image with zero or negative width created in function '%s'
|
negative image width: Image with zero or negative width created in function '%s'
|
||||||
#TODO: Localize
|
#TODO: Localize
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ template <typename T> inline T sqr(T x) { return x * x; }
|
|||||||
void linear_blend(Image& img1, const Image& img2, double x1,double y1, double x2,double y2) {
|
void linear_blend(Image& img1, const Image& img2, double x1,double y1, double x2,double y2) {
|
||||||
int width = img1.GetWidth(), height = img1.GetHeight();
|
int width = img1.GetWidth(), height = img1.GetHeight();
|
||||||
if (img2.GetWidth() != width || img2.GetHeight() != height) {
|
if (img2.GetWidth() != width || img2.GetHeight() != height) {
|
||||||
throw Error(_ERROR_1_("blending different sizes", "linear_blend"));
|
throw Error(_ERROR_3_("blending different sizes", "linear_blend", String()<<width<<_("x")<<height, String()<<img2.GetWidth()<<_("x")<<img2.GetHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
const int fixed = 1<<16; // fixed point multiplier
|
const int fixed = 1<<16; // fixed point multiplier
|
||||||
@@ -82,10 +82,10 @@ void linear_blend(Image& img1, const Image& img2, double x1,double y1, double x2
|
|||||||
void mask_blend(Image& img1, const Image& img2, const Image& mask) {
|
void mask_blend(Image& img1, const Image& img2, const Image& mask) {
|
||||||
int width = img1.GetWidth(), height = img1.GetHeight();
|
int width = img1.GetWidth(), height = img1.GetHeight();
|
||||||
if (img2.GetWidth() != width || img2.GetHeight() != height) {
|
if (img2.GetWidth() != width || img2.GetHeight() != height) {
|
||||||
throw Error(_("Images used for blending in masked_blend function must have the same size"));
|
throw Error(_ERROR_3_("blending different sizes", "masked_blend", String()<<width<<_("x")<<height, String()<<img2.GetWidth()<<_("x")<<img2.GetHeight()));
|
||||||
}
|
}
|
||||||
if (mask.GetWidth() != width || mask.GetHeight() != height) {
|
if (mask.GetWidth() != width || mask.GetHeight() != height) {
|
||||||
throw Error(_("Mask used for blending in masked_blend function must have the same size as the images"));
|
throw Error(_ERROR_3_("blending different mask", "masked_blend", String()<<width<<_("x")<<height, String()<<mask.GetWidth()<<_("x")<<mask.GetHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
UInt size = width * height;
|
UInt size = width * height;
|
||||||
@@ -124,17 +124,18 @@ void set_alpha(Image& img, const Image& img_alpha) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void set_alpha(Image& img, Byte* al, const wxSize& alpha_size) {
|
void set_alpha(Image& img, Byte* al, const wxSize& alpha_size) {
|
||||||
if (img.GetWidth() != alpha_size.GetWidth() || img.GetHeight() != alpha_size.GetHeight()) {
|
int width = img.GetWidth(), height = img.GetHeight();
|
||||||
throw Error(_("Image must have same size as mask"));
|
if (width != alpha_size.GetWidth() || height != alpha_size.GetHeight()) {
|
||||||
|
throw Error(_ERROR_3_("blending different mask", "set_alpha", String()<<width<<_("x")<<height, String()<<alpha_size.GetWidth()<<_("x")<<alpha_size.GetHeight()));
|
||||||
}
|
}
|
||||||
if (!img.HasAlpha()) {
|
if (!img.HasAlpha()) {
|
||||||
// copy
|
// copy
|
||||||
img.InitAlpha();
|
img.InitAlpha();
|
||||||
memcpy(img.GetAlpha(), al, img.GetWidth() * img.GetHeight());
|
memcpy(img.GetAlpha(), al, width * height);
|
||||||
} else{
|
} else{
|
||||||
// merge
|
// merge
|
||||||
Byte *im = img.GetAlpha();
|
Byte *im = img.GetAlpha();
|
||||||
size_t size = img.GetWidth() * img.GetHeight();
|
size_t size = width * height;
|
||||||
for (size_t i = 0 ; i < size ; ++i) {
|
for (size_t i = 0 ; i < size ; ++i) {
|
||||||
im[i] = (im[i] * al[i]) / 255;
|
im[i] = (im[i] * al[i]) / 255;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,13 +449,14 @@ void combine_image_do(Image& a, Image b) {
|
|||||||
|
|
||||||
void combine_image(Image& a, const Image& b, ImageCombine combine) {
|
void combine_image(Image& a, const Image& b, ImageCombine combine) {
|
||||||
// Images must have same size
|
// Images must have same size
|
||||||
if (a.GetWidth() != b.GetWidth() || a.GetHeight() != b.GetHeight()) {
|
int width = a.GetWidth(), height = a.GetHeight();
|
||||||
throw Error(_ERROR_1_("blending different sizes", "combine_blend"));
|
if (b.GetWidth() != width || b.GetHeight() != height) {
|
||||||
|
throw Error(_ERROR_3_("blending different sizes", "combine_blend", String()<<width<<_("x")<<height, String()<<b.GetWidth()<<_("x")<<b.GetHeight()));
|
||||||
}
|
}
|
||||||
// Copy alpha channel?
|
// Copy alpha channel?
|
||||||
if (b.HasAlpha()) {
|
if (b.HasAlpha()) {
|
||||||
if (!a.HasAlpha()) a.InitAlpha();
|
if (!a.HasAlpha()) a.InitAlpha();
|
||||||
memcpy(a.GetAlpha(), b.GetAlpha(), a.GetWidth() * a.GetHeight());
|
memcpy(a.GetAlpha(), b.GetAlpha(), width * height);
|
||||||
}
|
}
|
||||||
// Combine image data, by dispatching to combineImageDo
|
// Combine image data, by dispatching to combineImageDo
|
||||||
switch(combine) {
|
switch(combine) {
|
||||||
|
|||||||
Reference in New Issue
Block a user