Primary tabs

Comments by User

Monday, January 8, 2018 - 03:55

No idea why that should be, working fine for me.

Friday, August 18, 2017 - 02:33

Friday, August 4, 2017 - 02:16

The mouse panning in image-space rather than screen-space is certainly in the "oh god it's so painful, it hurts to use it" category. Better not to use the mouse for panning at all in that case.

If the program tells me the preview is at 100% zoom then I absolutely expect that to be the case.

The others are in the "it's exactly what I was expecting (standard practice) but it not the way I think it should be done" category, I won't even mention scrollbars for 2D scrolling.

If you aren't going to have zoom-at-mouse then ideally allow panning beyond the edge of the image (place zoom origin anywhere on the image) so the user can still navigate by zoom out, pan, zoom in.

Friday, July 28, 2017 - 10:20

Preview zoom scales with window size, listed view scale doesn't change.

Panning doesn't seem to be happinging in screen space so when zoomed it doesn't track intuitively with mouse cursor.

Being able to zoom out below 100% then zoom at mouse cursor would be handy for navigating large images.

Mousewheel zoom with MMB pan would be nice.

 

Here's the relevant code from one of my projects for mouse-view-transform-as-I-like-it, feel free to steal (QTransform is just a 3X3 transform matrix):

void ImageEditor::rotateScaleAtPoint(QTransform &transform, const qreal rotation, const qreal scaling, const QPointF point)
{
const QPointF pointBefore = (transform.inverted()).map(point);
transform *= QTransform().scale(scaling, scaling) * QTransform().rotate(rotation);
const QPointF pointAfter = (transform.inverted()).map(point);
const QPointF offset = pointAfter - pointBefore;
transform = QTransform().translate(offset.x(), offset.y()) * transform;
}

bool ImageEditor::handleMouseEvent(const Qt::KeyboardModifiers modifiers, const Qt::MouseButton button, const QPoint pos)
{
const QPointF lastMouse = mouseTransform.map(lastMousePos);
const QPointF mousePos = mouseTransform.map(pos);
const QPointF pixelCoordF = viewTransform.inverted().map(QPointF(mousePos));
const QPoint pixelCoord(static_cast(floor(pixelCoordF.x())), static_cast(floor(pixelCoordF.y())));

const QSet states = mouseState.machine.configuration();
if (states.contains(&mouseState.leftToolState)) {
setDocumentModified();
}
else if (states.contains(&mouseState.leftPickState)) {
}
else if (states.contains(&mouseState.rightToolState)) {
}
else if (states.contains(&mouseState.rightPickState)) {
}
else if (states.contains(&mouseState.panState)) {
QPointF translation = QPointF();
translation += mousePos - lastMouse;
viewTransform *= QTransform().translate(translation.x(), translation.y());
update();
}
else if (states.contains(&mouseState.rotozoomState)) {
qreal scaling = QVector2D(mousePos).length() / QVector2D(lastMouse).length();
qreal rotation = qRadiansToDegrees(atan2(mousePos.y(), mousePos.x()) - atan2(lastMouse.y(), lastMouse.x()));
rotateScaleAtPoint(viewTransform, rotation, scaling, QPointF(0., 0.));
update();
}

lastMousePos = pos;
lastPixelCoord = pixelCoord;

return true;
}

void ImageEditor::wheelEvent(QWheelEvent *event)
{
const qreal delta = event->angleDelta().y() / (15.0 * 8.0);
const qreal scaling = pow(2, delta);
const qreal rotation = -15.0 * delta;

if (event->modifiers() == Qt::NoModifier) {
rotateScaleAtPoint(viewTransform, 0.0, scaling, mouseTransform.map(event->posF()));
update();
}
else if (event->modifiers() == Qt::ShiftModifier) {
rotateScaleAtPoint(viewTransform, rotation, 1.0, mouseTransform.map(event->posF()));
update();
}
event->accept();
}

Friday, July 14, 2017 - 20:36

Is there a particular image file format that does this sort of thing?

Not that I'm aware of, I just lay out the subpalettes in the palette in sequence.

Subpalette swapping is use case too, but essentially the same as gradient swapping.

 

My vision was: if you want to work with NES, SMS, etc. just load up that palette and have at it.

These systems doubly abstract colour values. The display element's (tile or sprite) pixels index into the element's subpalette which in turn indexes into the master palette to get the actual colour value.

Friday, July 14, 2017 - 19:14

Runs fine in Wine with the exception of file dialogs appearing behing the main window.

If you don't work with indices then you can't really work with images with subpalettes (NES, SMS, MD, GBC, etc.). If two subpalettes contain the same colour then they'll both be changed.
Working with RGB values could still be useful especially with a similarity threshold for higher colour images.
An option to select between indexed and RGB working modes would be nice.

Preview functionality could be improved considerably.
I figured picking the index from the preview was a given.
Large image is scaled to less than 1x so I can't see individual pixels. Being able to freely zoom and pan preview is a must.

Be nice is there was an option to use the target palette as the destination palette when an image is loaded so it doesn't need to be loaded again seperately.

Wednesday, July 12, 2017 - 08:17

Whole sheet colour variants were just one use-case. What if you only want to recolour just the hurt frames in a sprite sheet to flash red?

 

Merge: yes, replace all selected colours with some kind of average colour. Colour consolidation functionality, so you can remap multiple close colours to a single better fitting colour.

Revert: replace selected colours with the corresponding indices of the source palette.

Best Fit: yep, any colour space is probably good enough to get a base mapping to hand tweak.

Mapping: no mapping just keeps the index as is.

 

Wednesday, July 12, 2017 - 05:31

I was thinking something like this:

A template is just the set of regions with their mappings so they can be reused on multiple sprite/tile sheets following the same template.

Tuesday, July 11, 2017 - 16:49

Looks good.

For me to be bothered to use something like this outside of the editor it would need to perform many different mappings on different areas of the same image. eg. If I want to do 8 colour variations of a sprite, I duplicate the sprite 8 times in the source file, open it in your tool, select the first copy, fiddle with the colours, select the next copy, fiddle with the colours and so on.

Being able to create new colours is important, rather than being limited to a pre-existing palette.

A nice feature for larger gradient-based palettes would be support for gradient-to-gradient mappings. So mark a sequence on the source palette and a sequence of the destination palette then intepolated the one to the other. Be much easier than individually marking each colour on a large palette and allow adapting between different gradient sizes.

AFAIK the Pixel Joint forums are the original home of DB's palettes.

Friday, July 7, 2017 - 02:48

I don't know of any dedicated tool, but something like you describe would certainly be neat as editor built-in functionality.

My somewhat convoluted process using GraphicsGale (full version now freeware, by the way) for indexed images is to copy the section I want to recolour, paste as a new image, perform necessary palette manipulations on new image, copy and paste back into original image. If I've created new colours that I don't want fit back into the original palette I first convert the original image to truecolour, then back to indexed after pasting.

Pages