mirror of https://github.com/aseprite/aseprite.git
Compare commits
3 Commits
3448bd36e3
...
4f4582bc9d
| Author | SHA1 | Date |
|---|---|---|
|
|
4f4582bc9d | |
|
|
577caa4793 | |
|
|
f3a372e78e |
|
|
@ -4631,13 +4631,13 @@ void Timeline::onDrop(ui::DragEvent& e)
|
||||||
std::string txmsg;
|
std::string txmsg;
|
||||||
std::unique_ptr<docapi::DocProvider> docProvider = nullptr;
|
std::unique_ptr<docapi::DocProvider> docProvider = nullptr;
|
||||||
if (droppedImage) {
|
if (droppedImage) {
|
||||||
txmsg = "Dropped image on timeline";
|
txmsg = "Drop Image";
|
||||||
doc::ImageRef image = nullptr;
|
doc::ImageRef image = nullptr;
|
||||||
convert_surface_to_image(surface.get(), 0, 0, surface->width(), surface->height(), image);
|
convert_surface_to_image(surface.get(), 0, 0, surface->width(), surface->height(), image);
|
||||||
docProvider = std::make_unique<DocProviderFromImage>(image);
|
docProvider = std::make_unique<DocProviderFromImage>(image);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
txmsg = "Dropped paths on timeline";
|
txmsg = "Drop File";
|
||||||
docProvider = std::make_unique<DocProviderFromPaths>(m_document->context(), paths);
|
docProvider = std::make_unique<DocProviderFromPaths>(m_document->context(), paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (c) 2024 Igara Studio S.A.
|
// Copyright (c) 2024-2025 Igara Studio S.A.
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
|
|
@ -26,7 +26,7 @@ uint32_t convert_color_to_image(gfx::Color c, const os::SurfaceFormatData* fd)
|
||||||
uint8_t b = ((c & fd->blueMask) >> fd->blueShift);
|
uint8_t b = ((c & fd->blueMask) >> fd->blueShift);
|
||||||
uint8_t a = ((c & fd->alphaMask) >> fd->alphaShift);
|
uint8_t a = ((c & fd->alphaMask) >> fd->alphaShift);
|
||||||
|
|
||||||
if (fd->pixelAlpha == os::PixelAlpha::kPremultiplied) {
|
if (a > 0 && fd->pixelAlpha == os::PixelAlpha::kPremultiplied) {
|
||||||
r = r * 255 / a;
|
r = r * 255 / a;
|
||||||
g = g * 255 / a;
|
g = g * 255 / a;
|
||||||
b = b * 255 / a;
|
b = b * 255 / a;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue