Giter Club home page Giter Club logo

Comments (15)

kimasendorf avatar kimasendorf commented on August 29, 2024 1

Not sure, but I think by default Processing uses only 256mb RAM.. And can handle max 2048mb.. But you need to set the value in the preferences.

Kim Asendorf
http://kimasendorf.com

Am 27.05.2016 um 00:17 schrieb David French [email protected]:

Okay, sorry to triple post, but I designated the color. Didn't work at first but then I made sure to match the size, because I figured the color must not be destroyed when it's rescaled down or something.

And then it works... sorta? It runs through, no errors but the file it spits out is zero kb and empty.

Just tried doing it again with a scaled down image of 200x150 and it still is producing the blank image. I don't think it's a ram issue since this computer has 8 gigs plus 4 vram.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #4 (comment)

from asdfpixelsort.

netrocc avatar netrocc commented on August 29, 2024 1

the mode defines what kind of pixels should be sorted. If you use mode 1 you can adjust the sorting with int brigthnessValue = 60;

from asdfpixelsort.

netrocc avatar netrocc commented on August 29, 2024 1

exactly!

from asdfpixelsort.

kimasendorf avatar kimasendorf commented on August 29, 2024

Hi there,

what IDE do you use?

Normally an unused variable should not an error in the Processing IDE. Do you use Eclipse?

Also Color c; should be in line 153 and is used in 154..

Maybe you accidentally messed up the code somewhere..

Hope that helps

Peace

Kim Asendorf
http://kimasendorf.com

Am 26.05.2016 um 23:43 schrieb David French [email protected]:

Hey sorry to bother. I'm an artist/designer who is starting to use code in his workflow. I tried running the program, and I got some errors:

I get an error online 151 that says "The value of the local variable 'c' is not used".

That line is

color c;

I'm guessing this is basically saying that a specific color hasn't been specified to sort? Wasn't sure if that's true or not, just wanted to check in. This is my first time doing processing. I've done web markup stuff and a little Unity but nothing else so I'm learning as I go.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #4

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Hey Kim,

I'm using the latest version of Processing from the website (which includes the IDE I believe, correct?)

I didn't edit anything in the code except for one thing. When I first tried to run the program I got an error for size(img.width, img.height); so I changed it to size(900, 600); Other than that, everything else should be the same.

To just see what was going on, I changed color c; to color c = color(123, 148, 207); The image now actually opens up, but then this error is thrown: ArrayIndexOutOfBoundsException: 48000

Looking online it seems that is some kind of error I'm having with the loop. I'm reverting my code to the master to start over, since I'm guessing from your most recent reply the color c; thing should be working some other way and I want to make sure I'm not messing up something.

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Oh okay so I see why there's a mismatch in line number. I was using the version from your website. I got the newest version from the github now. Trying that. It's running so far, but seems to have frozen and isn't responding. Do I need to designate the color like I tried last time?

Once again, thank you for your patience with my lack of code knowledge here. I know very little but I'm learning more.

from asdfpixelsort.

kimasendorf avatar kimasendorf commented on August 29, 2024

Please check the RAM settings in Processing. Depending on the image size you are using you need more RAM. Or try a smaller image.

Kim Asendorf
http://kimasendorf.com

Am 27.05.2016 um 00:07 schrieb David French [email protected]:

Oh okay so I see why there's a mismatch in line number. I was using the version from your website. I got the newest version from the github now. Trying that. It's running so far, but seems to have frozen and isn't responding. Do I need to designate the color like I tried last time?

Once again, thank you for your patience with my lack of code knowledge here. I know very little but I'm learning more.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #4 (comment)

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Okay, sorry to triple post, but I designated the color. Didn't work at first but then I made sure to match the size, because I figured the color must not be destroyed when it's rescaled down or something.

And then it works... sorta? It runs through, no errors but the file it spits out is zero kb and empty.

Just tried doing it again with a scaled down image of 200x150 and it still is producing the blank image. I don't think it's a ram issue since this computer has 8 gigs plus 4 vram.

I checked to see what part of the code saves the image. I see a thing that says image(img, 0, 0);

Is that where I'm supposed to set the size of the image? (as in the size of the output image)

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Okay so I upped the Ram to 4 gigs, but I'm not sure if I'm getting the right image. It could be sorted? It doesn't look anything remotely like the starting image? I'm using mode 1, though I can't tell from the documentation which mode is which and what the fundamental difference is. I can guess that the bright black white is probably the basis of sorting though. Would bright mode 1 usually produce a more distorted image?

And I'm still not clear on whether or not I'm supposed to designate color. Is color c;meant to stay that way or should I give it a specific value?

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Thank you. I think I see now. So color c; should not be edited, correct? Only int I should change (depending on mode) are brightness, whitevalue, blackvalue, and.... I see a mode b, but not sure what that is or what int it might relate to?

Also black value and white value are what in relation to RGB? Brightness is obviously just normal 255 brightness setting, but I'm not sure I understand how to find black or white value. I tried looking it up on processing's website if that was something built into the language.

And last question, the int loops is how many loops, how great an effect it will have correct?

from asdfpixelsort.

kimasendorf avatar kimasendorf commented on August 29, 2024

b is not a mode, just shows the highest color value when you use the color as integer. pls read in the processing reference about colors =)

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

I'm very sorry, I hope I'm not bothering you. I am actually already looking at the color information on processor's website, and most of it seems pretty straightforward but the number next to b is a number that doesn't seem to match any of the formatting for RGB color information. Additionally as I asked, I am still not clear on whitevalue or blackvalue are or how a concept of black or white value is distinct from brightness. And as I said, I've been searching the web in case I missed something.

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Oh wait, so b isn't a mode, so when you say that the int is the highest value it can be you mean highest value the black or white value can be set to, correct? I think I see now.

from asdfpixelsort.

kimasendorf avatar kimasendorf commented on August 29, 2024

black value means everything below the threshold gets sorted and white value means everything above. Look for RGB to int!

Kim Asendorf
http://kimasendorf.com

Am 27.05.2016 um 00:55 schrieb David French [email protected]:

I'm very sorry, I hope I'm not bothering you. I am actually already looking at the color information on processor's website, and most of it seems pretty straightforward but the number next to b is a number that doesn't seem to match any of the formatting for RGB color information. Additionally as I asked, I am still not clear on whitevalue or blackvalue are or how a concept of black or white value is distinct from brightness. And as I said, I've been searching the web in case I missed something.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub #4 (comment), or mute the thread https://github.com/notifications/unsubscribe/AAOW1P7ZKf__MyAjQdhN0hTRioUQ-y2sks5qFiTMgaJpZM4In-3L.

from asdfpixelsort.

jcklpe avatar jcklpe commented on August 29, 2024

Oooh, okay, I just got it. 256_256_256 is 16777216. The processing documentation doesn't mention that, it just says includes the normal (x,y,z) formatting. I think I got it now

from asdfpixelsort.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.