Jump to content

Haskell Problem

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Stallion

Stallion

    Newbie

  • Members
  • Pip
  • 2 posts
Hello,

I am currently trying to write a Haskell program to half size an image in terms of pixels and rows. I know what I need to do, which is to remove every second pixel within reach row (or something along those lines), but I don't know how to do this. If a pixel was an Int, it would be simpler to design a function to eliminate each individual even number but seeing as I essentially need to remove every second tupule from a list of tupules.

Also keep in mind that I'm rather new to this, so bear with me.

Thanks lots!

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Can you show us the code for your best guess? Also, you would generally want to do some sort of average of the pixels, not a simple elimination.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Stallion

Stallion

    Newbie

  • Members
  • Pip
  • 2 posts
It's alright, I've fixed it!

Edited by Stallion, 30 March 2010 - 04:59 AM.