Lines Matching +defs:main +defs:table
111 main(int argc, char *argv[])
333 Error("Can't malloc color table");
756 Table table;
802 table.x = (Position *) malloc(sizeof(Position) * (src_image->width + 1));
803 if (table.x == NULL)
804 Error("Can't malloc scaled image X table");
805 table.y = (Position *) malloc(sizeof(Position) * (src_image->height + 1));
806 if (table.y == NULL)
807 Error("Can't malloc scaled image Y table");
808 table.width = (Dimension *) malloc(sizeof(Dimension) * src_image->width);
809 if (table.width == NULL)
810 Error("Can't malloc scaled image width table");
811 table.height = (Dimension *) malloc(sizeof(Dimension)*src_image->height);
812 if (table.height == NULL)
813 Error("Can't malloc scaled image height table");
815 table.x[0] = 0;
817 table.x[x] = roundint(ratio_x * x);
818 table.width[x - 1] = table.x[x] - table.x[x - 1];
821 table.y[0] = 0;
823 table.y[y] = roundint(ratio_y * y);
824 table.height[y - 1] = table.y[y] - table.y[y - 1];
827 for (min_y = table.y[src_y]; min_y < exp_max_y; min_y = table.y[y]) {
833 for (y = src_y; table.y[y] < max_y; y++) {
834 if (table.y[y] < min_y)
840 for (h = 0; h < table.height[y]; h++) {
842 (table.y[y] + h - min_y) *
843 dest_image->bytes_per_line + table.x[x],
844 pixel, table.width[x]);
850 for (h = 0; h < table.height[y]; h++) {
851 for (w = 0; w < table.width[x]; w++)
853 table.x[x] + w,
854 table.y[y] + h - min_y,
861 exp_x, min_y, exp_width, table.y[y] - min_y);
866 free(table.x);
867 free(table.y);
868 free(table.width);
869 free(table.height);