Questions tagged [reflect]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Pset4 reflect works but doesn't pass check50

I am so close on the reflect function for pset4. When I run the program it appears to work properly, but it doesn't pass check50. Does anyone know what I am doing wrong? void swap(RGBTRIPLE *a, ...
0
votes
1answer
30 views

CS50 PSET 4 REFLECT FAILS CS50

This code does indeed reflect the image, but, there is a slight line in the middle. And CS50 fails it completely // Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[...
0
votes
2answers
34 views

Logic for reflect function in pset4 filter

I'm working through pset4 filter and the code for the reflect function. I'm still getting errors so clearly there's some kind of issue with my logic. When I try to apply filter to an actual image, I ...
0
votes
2answers
19 views

CS50 pset4 filter reflect issue

i am missing something here...but not sure what... it doesn't work on normal images... check50 passes for 1X2 and 1X3 images but fails for 3x3 and 4x4 images (so i guess it is an issue of iterating ...
0
votes
1answer
39 views

PSET 4 BLUR and 2 of REFLECT

All of reflect works except reflected a 1 x 2 and a 4 x 4 (3x3 works fine) None of blur works except for when a point is in the corner, which makes little sense. I've sluthed around other answers and ...
1
vote
2answers
73 views

PSET 4 Reflect help

I am not sure why I am having issues with my code. I know I can store the rgb values for the left pixels in 3 temporary variables then assign the right values to the left and the temp values to the ...
0
votes
1answer
107 views

PSET4 Filter Reflect : No Reflection

Using Debug50, I can see that the RGB pixel values are appropriately swapped through. However the outfile is not actually reflected at all. The last comment section for the "fix" only seem to apply a ...
0
votes
1answer
87 views

pset 4 reflect & blur work but don't test

My reflect function doesn't seem to do anything to the outputted image and my blur image fails check50 even though the resulting image looks visually blurred. Any insight into why this is the case is ...
0
votes
2answers
124 views

Pset 4 filter: reflect help

I have been stuck on pset4 for a while and when I try to compile my code I now get 3 errors in the reflect function which are: helpers.c:83:6: error: conflicting types for 'swap' void swap(int *a,...
0
votes
1answer
32 views

PSET 4 Filters CS50

void reflect(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE temp[height][width]; for (int i = 0 ; i < height ; i++) { for (int j = 0 ; j < width ; j++...
0
votes
1answer
56 views

pset4 Filter Reflect could anyone check my code, I can't find the error as to why it does not output desirably

// Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[height][width]) { int t[3]; // using temporary array to swap values for(int i=0;i<height-1;i++) // loop thru ...
0
votes
1answer
126 views

Pset 4 Filter Reflect less

I can't find why it doesn't work. That's the error message: index 600 out of bounds for type 'RGBTRIPLE [width] And I think it makes half reflection and half stays the same... That's my code: // ...
0
votes
2answers
35 views

Code divides image

I run my code and it complies and provides a (kind of) reflected image. It breaks the image in half and mirrors it instead of just reflecting. My goal was to switch the place of each pixel in the row, ...
1
vote
1answer
196 views

pset4 filter reflect. runtime error: index 601 out of bounds for type 'RGBTRIPLE [width]'

Below is the code that generated the error message. From what i can tell some part of this created a [j] value that was larger than the width. My thoughts on this problem was: With a hypothetical ...
0
votes
1answer
79 views

Reflection - Pset4 - Code compiles however, not producing expected outcome

I have the following code below. The code compiles correctly, but the resulting images is exactly the same as the one that was used as the input file. I have gone through each line multiple times and ...
0
votes
1answer
241 views

CS50 - Filter - Reflect Image

I am working through CS50's PSET #4, specifically filter -> reflect. I can get the image to present correctly (i.e., it is mirrored), but it is not exact enough to pass the CS50 Check. My code is as ...
1
vote
1answer
647 views

runtime error in filter: reflect

I wish i could be more specific but i really don't understand the errors i'm getting This is my reflect function: // Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[...
0
votes
1answer
81 views

valgrind on filter -r. No leaks but errors

I am working on pset4 filter -r (reflection). How I want to achieve reflection: Reserve space in memory, enough to fit an image. Name it image-copy. Copy 1-to-1 the original file there. Original ...
1
vote
1answer
616 views

pset4: filter reflect all check right except two of them

all checked right except two of them. it reflected the image correctly but I found two errors I can not understand them and how to solve it. void reflect(int height, int width, RGBTRIPLE image[...
0
votes
1answer
1k views

pset4 filter: reflect the image reflect half only

if I remove this line (*a = temp2) the left image only reflects and if I remove this line (*b = temp ) the right image only reflects but if I write both the image return into the original one no ...
0
votes
2answers
1k views

CS50_2020 Pset 4 Filter Reflect

I'm currently working on the reflect function, I'm going to include my code below [removed] What problem are you having? Describe the problem in detail. If appropriate, include any error messages, ...
0
votes
2answers
550 views

pset4 filter: reflect produces “UndefinedBehaviorSanitizer:DEADLYSIGNAL” forever

When I filter to reflect an image, it keeps printing the following without stopping: UndefinedBehaviorSanitizer:DEADLYSIGNAL UndefinedBehaviorSanitizer:DEADLYSIGNAL UndefinedBehaviorSanitizer:...