This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(UIImage *) createARGBImageFromRGBAImage: (UIImage*)image | |
| { CGSize dimensions = [image size]; | |
| NSUInteger bytesPerPixel = 4; | |
| NSUInteger bytesPerRow = bytesPerPixel * dimensions.width; | |
| NSUInteger bitsPerComponent = 8; | |
| unsigned char *rgba = malloc(bytesPerPixel * dimensions.width * dimensions.height); | |
| unsigned char *argb = malloc(bytesPerPixel * dimensions.width * dimensions.height); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.forms import ModelForm, Textarea | |
| from myapp.models import Author | |
| class AuthorForm(ModelForm): | |
| class Meta: | |
| model = Author | |
| fields = ('name', 'title', 'birth_date') | |
| widgets = { | |
| 'name': Textarea(attrs={'cols': 80, 'rows': 20}), | |
| } |