karansher / computer-graphics-raster-images

Computer Graphics Assignment about Raster Images
1 stars 0 forks source link

Is the code supposed to work for any channel number (theoretically) #52

Open kevin-j-wang opened 1 year ago

kevin-j-wang commented 1 year ago

the functions take in num_channels as a parameter so theoretically they should be functional for any number of channels, even though in practice the only num_channels it will be are 1, 3, and 4.

I'll go ahead and say right now that my functions only work for num_channels = 3, because the dog image used in testing has 3 channels. I'm wondering if not having a generalized solution will cost me marks.

edit: i should clarify i mean for rotation and for reflection functions, naturally the functions that relate to grayscale images are 1 channel (but you can't reflect or rotate them after they've been turned gray :D)

abhimadan commented 1 year ago

PPM files don't support alpha channels, so you just need to support grayscale and RGB.