Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void dechunck(Pixel ** image, int f, int h, int w){
- int h0, w0;
- int h1, w1;
- int h2, w2;
- int h3, w3;
- int h4, w4;
- int h5, w5;
- int h6, w6;
- int h7, w7;
- int h8, w8;
- int h9, w9;
- int h10, w10;
- int h11, w11;
- int h12, w12;
- int h13, w13;
- int h14, w14;
- int h15, w15;
- Pixel ** t0;
- Pixel ** t1;
- Pixel ** t2;
- Pixel ** t3;
- Pixel ** t4;
- Pixel ** t5;
- Pixel ** t6;
- Pixel ** t7;
- Pixel ** t8;
- Pixel ** t9;
- Pixel ** t10;
- Pixel ** t11;
- Pixel ** t12;
- Pixel ** t13;
- Pixel ** t14;
- Pixel ** t15;
- t0 = LoadImage("0", &h0, &w0);
- if(f > 0){
- t1 = LoadImage("1", &h1, &w1);
- }
- printf("%i", w0);
- printf("nice\n");
- SaveImage("test", t1, h1, w1);
- if(f > 1){
- t2 = LoadImage("2", &h, &w);
- t3 = LoadImage("3", &h, &w);
- }
- if(f > 2){
- t4 = LoadImage("4", &h, &w);
- t5 = LoadImage("5", &h, &w);
- t6 = LoadImage("6", &h, &w);
- t7 = LoadImage("7", &h, &w);
- }
- if(f > 3){
- t8 = LoadImage("8", &h, &w);
- t9 = LoadImage("9", &h, &w);
- t10 = LoadImage("10", &h, &w);
- t11 = LoadImage("11", &h, &w);
- t12 = LoadImage("12", &h, &w);
- t13 = LoadImage("13", &h, &w);
- t14 = LoadImage("14", &h, &w);
- t15 = LoadImage("15", &h, &w);
- }
- for(int i = 0; i < h; i++){
- for(int j = 0; j < w; j++){
- if(f == 1){
- if(j <= w/2){
- for(int y = 0; y < h0; y++){
- for(int x = 0; x < w0; x++){
- image[i][j] = t0[y][x];
- printf("%i", j);
- j++;
- }
- printf("\n");
- i++;
- }
- j = w/2;
- }
- if(j > w/2){
- for(int y = 0; y < h1; y++){
- for(int x = 0; x < w1; x++){
- image[i][j] = t1[y][x];
- j++;
- }
- i++;
- }
- }
- }
- }
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement