Forum Archive

Pixel Editor

Sebastian

Here's a simple pixel editor I made. It only works on iPad, I don't see the point in making an iPhone version (because of the small screen). It's not really done yet, the code is a mess and there is still a lot of bugs, but I thought I'd share it anyways XD

This is how it looks like:

Dann239

Very cool! Thank you for sharing.

brumm

Great, thank you.
Is it to early for a feature requests? Zoom in/out would be fantastic, if you use a higher resolution.

Sebastian

@brumm I don't really know how I would do that, but I'll look into it ;)

brumm

I think the easier way is to do it with a slider or you might want to use a two finger gesture.
example

Sebastian

@brumm I'm more concerned about how to actually choose a pixel while in the zooming state.

Sebastian

Still haven't figured out how to implement a zooming function. If anyone wants to give it a shot, you are more than welcome to! :)

This is how it looks like now:

brumm

I don't know if this works: you could add a button for a defined zoom factor (e.g. 16x16) and two sliders to choose the zoom area (a frame in the preview would be great for the orientation but also more work). Since the ImageView is not very flexible I think will test at the weekend a self written view (you can get the touch events and also call the 'set needs display()' methode). If you don't want to wait you can take look here

brumm

I saw you store the width and height of each pixel, so I would recommend that you change the image size while displaying the zoomed image / sector and of course the size of the pencil...

#only some thoughts...
get_image
...
img.draw(x,y,img_width*zoom,img_height*zoom)
...
touch.location/zoom*(x or y) + (x or y) #if pixel is located in another sector
paimian

your pixel editor is simple but useful . I'm starting to do pixel art more and more, and right now I'm using my XP-Pen Deco 03 Drawing Pad primarily for pixel art . feels more natural and precise.

sam rod

Zawescome