Jump to content




Sketch - Photoshop Inspired Image Editor for ComputerCraft


  • You cannot reply to this topic
61 replies to this topic

#21 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 21 March 2014 - 09:30 PM

View Postpasilein007, on 21 March 2014 - 08:06 PM, said:

Pastebin has a error reported

"pastebin:101: attempt index ? (a nil value)"
Test doing
edit pastebin
to see if you have a modified version of pastebin, If it does then goto that line and post it.
Or you can just delete that version :P

#22 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 23 March 2014 - 06:42 PM

Nope, I occasionally get that error too, and I haven't done something stupid like modified Pastebin or the rom. Even on a free reboot on a newly placed computer I can get that.

Edit: Hellkid, only 10 more posts until you get your custom title, start thinking about it!

Edited by awsmazinggenius, 23 March 2014 - 06:43 PM.


#23 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 23 March 2014 - 08:47 PM

View Postawsmazinggenius, on 23 March 2014 - 06:42 PM, said:

Edit: Hellkid, only 10 more posts until you get your custom title, start thinking about it!

I thought of the one I'm using at about 500 :P

#24 Chickenbreadlp

  • Members
  • 73 posts
  • LocationGermany

Posted 24 March 2014 - 02:34 PM

Could i use this for my OS. It is called ApfelOS and i will give credit.

#25 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 24 March 2014 - 08:49 PM

View PostChickenbreadlp, on 24 March 2014 - 02:34 PM, said:

Could i use this for my OS. It is called ApfelOS and i will give credit.

Sure!

To anyone else wanting to use Sketch in your OS you're most welcome to. As long as you don't modify and keep the name I'm fine with it. If you do want to modify it for some reason (even for OS API integration) please PM me.

#26 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 24 March 2014 - 11:59 PM

I've been working on Creative Craft Image Shack for a little bit now (my image editor for CC and OC in one file) and one thing that I'm adding is Undo. I think it might be something worth adding into Sketch and Ink, too.

Edited by awsmazinggenius, 24 March 2014 - 11:59 PM.


#27 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 25 March 2014 - 12:18 AM

View Postawsmazinggenius, on 24 March 2014 - 11:59 PM, said:

I've been working on Creative Craft Image Shack for a little bit now (my image editor for CC and OC in one file) and one thing that I'm adding is Undo. I think it might be something worth adding into Sketch and Ink, too.

If you look in the menu options is actually there, I just never got around to adding it. One of the issues is knowing how far back to revert to.

#28 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 30 March 2014 - 04:28 AM

View Postawsmazinggenius, on 25 March 2014 - 02:40 AM, said:

EDIT:
Posted Image
Since I only edited my post instead of creating a new one, I'm not sure oeed has actually seen the report. Hence, I'm going to have to double post, and ask to have my old one deleted.

#29 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 30 March 2014 - 04:47 AM

View Postawsmazinggenius, on 30 March 2014 - 04:28 AM, said:

View Postawsmazinggenius, on 25 March 2014 - 02:40 AM, said:

EDIT:
Posted Image
Since I only edited my post instead of creating a new one, I'm not sure oeed has actually seen the report. Hence, I'm going to have to double post, and ask to have my old one deleted.

Fixed.

#30 TableCraft0R

  • Members
  • 63 posts

Posted 12 June 2014 - 12:08 PM

How do I render skch images? [ like paintutills.loadImage? ]

#31 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 12 June 2014 - 10:38 PM

View PostTableCraft0R, on 12 June 2014 - 12:08 PM, said:

How do I render skch images? [ like paintutills.loadImage? ]

If you take a look at the bottom of the code (https://github.com/o...program/startup) you'll find the functions I use.

function ReadSKCH(path)
local _fs = fs
if OneOS then
  _fs = OneOS.FS
end
local file = _fs.open(path, 'r')
local _layers = textutils.unserialize(file.readAll())
file.close()
local layers = {}
for i, l in ipairs(_layers) do
  local layer = {
   Name = l.Name,
   Pixels = ParseNFT(l.Pixels),
   BackgroundColour = l.BackgroundColour,
   Visible = l.Visible,
   Index = l.Index,
  }
  table.insert(layers, layer)
end
return layers
end

function ParseNFT(lines)
local pixels = {}
for y, line in ipairs(lines) do
  local bgNext, fgNext = false, false
  local currBG, currFG = nil,nil
  local writePosition = 1
  for x = 1, #line do
   if not pixels[writePosition] then
    pixels[writePosition] = {}
   end
   local nextChar = string.sub(line, x, x)
		    if nextChar:byte() == 30 then
				    bgNext = true
		    elseif nextChar:byte() == 31 then
				    fgNext = true
		    elseif bgNext then
				    currBG = getColourOf(nextChar)
				    if currBG == nil then
					 currBG = colours.transparent
				    end
				    bgNext = false
		    elseif fgNext then
				    currFG = getColourOf(nextChar)
				    fgNext = false
		    else
				    if nextChar ~= " " and currFG == nil then
						    currFG = colours.white
				    end
				    pixels[writePosition][y] = {BackgroundColour = currBG, TextColour = currFG, Character = nextChar}
				    writePosition = writePosition + 1
		    end
  end
end
return pixels
end

It's essentially just a table of NFT files.

#32 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 14 June 2014 - 10:18 PM

Now that this is bumped, it seems that you use the serialization from textutils to serialize data. Have you considered copy-pasting the old CC1.58 textutils.serialize() function into your code to make file sizes smaller, as CC1.6 now serializes in a pretty fashion rather than a compact fashion? You can still unserialize data serialized with the old function with the current textutils.unserialize(), so it would give a smaller file.

#33 Lego Stax

  • Members
  • 136 posts
  • LocationThe dark depths of the web

Posted 02 August 2014 - 05:29 PM

I don't think I was ever using .NFT....

Attached Image: oneos bug.png

#34 Not-A-Spammer

  • Members
  • 5 posts

Posted 02 August 2014 - 08:30 PM

Look's Awesome. Great Job!!

#35 ade125

  • Members
  • 16 posts

Posted 28 October 2014 - 09:46 AM

Can I export to png?

#36 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 28 October 2014 - 10:12 AM

View Postade125, on 28 October 2014 - 09:46 AM, said:

Can I export to png?
There are a few other programs that will let you do that, but no, Sketch can't.

#37 ade125

  • Members
  • 16 posts

Posted 28 October 2014 - 01:10 PM

View Postoeed, on 28 October 2014 - 10:12 AM, said:

View Postade125, on 28 October 2014 - 09:46 AM, said:

Can I export to png?
There are a few other programs that will let you do that, but no, Sketch can't.
Can you list a few? would be perfect for concept art.

#38 Endergreen117

  • Members
  • 33 posts

Posted 27 November 2014 - 08:17 AM

So far it's been great! It's a lot better than NPaintPro, and FAR better than the default Paint that's included with cc. Keep up the good work!

REQUEST: After using this program for a little bit, I've realized the inconvenience of the lack of a "Save As..." option. This would make the program complete, in my opinion. However, other than that small, annoying bit, this program is great.

#39 ByteMe

  • Members
  • 124 posts
  • LocationAdelaide, Australia

Posted 13 December 2014 - 11:28 AM

Just a note, the ability to right click to erase and have two colours on the go would be very handy.

#40 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 15 December 2014 - 07:34 AM

So I've been working on a brand new version of Sketch. It uses Bedrock, my GUI API, to make everything easier and awesomer. It's pretty much a complete recode, the only original code is the loading and saving code, which I've still modified.

It's not quite ready, but it's pretty close. There's bound to be a few bugs here and there, so if you'd like to beta test it you can do so as such:

pastebin get QHE2JDPp sketch

I'll go in to more details about the new features once it's released, but here's a few:
  • 'Flatten' images
  • No more sidebar - everything is done with windows, you can move them and redock them
  • Resize images (not as in crop, as in double the size of pixels or whatever)
  • Zooming (kinda like above)
  • Undo and redo
  • Save as (and in whatever format you want)
  • Filters (think Photoshop adjustment layers, such as black and white, invert, etc)
  • Filter masks, again, think Photoshop adjustment layer masks
  • Two current colours, left click for the first colour right for the second
  • Spray can (like the one in MS Paint, kinda useless, but meh)
  • More stuff I've forgotten about

Edited by oeed, 15 December 2014 - 07:52 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users