Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pictures & Images

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Sep 23, 2008 11:35 pm    Post subject: Pictures & Images Reply with quote

SO - How can I take a photo with my iPhone app?

"The UIImagePickerController class lets you take pictures or choose them
from the photo library. Specify the source type as UIImagePickerController-
SourceTypeCamera."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Wed Sep 24, 2008 4:25 pm    Post subject: Reply with quote

SO - How to tint a UIButton?

"Is there a way to load a grayscale PNG and adjust it to the color I want?
Better yet, is there a way to get Apple's glassy look without having to load
custom images at all?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Sep 27, 2008 12:51 am    Post subject: Reply with quote

Geoff Teehan: iPhone GUI PSD

"Since we know we’ll be doing more of this, we created our own Photoshop
file that has a fairly comprehensive library of assets – all fully editable."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Oct 09, 2008 8:54 pm    Post subject: Reply with quote

SO - How to save picture to iPhone photo library?

"What do I need to do to save an image my program has generated (possibly
from the camera, possibly not) to the system photo library on the iPhone?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Oct 10, 2008 9:29 am    Post subject: Reply with quote

How to identify which device the user is on?

"My app can take a photo, but I want to disable this for 1st gen iPod Touch
owners. How do I know what device the app is running on?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sun Oct 19, 2008 2:38 am    Post subject: Reply with quote

SO - How can I upload a photo to a server with the iPhone? - OMG!

"I'm writing an iPhone app that takes a photo and then uploads it to a server.
How do I upload a photo to a server with Cocoa in Xcode? I suppose I use NSUrl
somewhere."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat May 02, 2009 8:16 pm    Post subject: Reply with quote

SO - JPEG Quality when creating a JPEG in Carbon

"I'm writing a Carbon application and we are creating JPEG files. I'm currently
doing this by using Quartz CGImageDestinations and kCGImagePropertyJFIF-
Dictionary."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu May 14, 2009 9:47 pm    Post subject: Reply with quote

MF - How to crop an image?

"One way is to use CGImageCreateWithImageInRect()."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Jun 02, 2009 1:39 pm    Post subject: Reply with quote

MF - iPhone Screenshots

"I am able to easily create screenshots but was wondering if people knew
how to create a nice frame around the screenshot (i.e. iPhone frame) like
lots of the screenshots here."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jun 05, 2009 12:51 am    Post subject: Reply with quote

iphonedevsdk.com - Splash Screen

"I would like to play the video before anything else happens like in poker5k."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Jul 15, 2009 9:42 pm    Post subject: Reply with quote

SO - Any idea why this image masking code does not work?

"I have this code to mask an image. Basically, I only work with PNG images.
So I have a 300x400 PNG image with 24bits of color (PNG-24). I am not sure
if it also has an alpha channel. But there's no transparency in it."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Aug 08, 2009 8:17 pm    Post subject: Reply with quote

MF - Saving CGImage to disk

"I have a UIImage that I want to write to disk as PNG. The thing is that for
some reason I don't want to use the UIImagePNGRepresentation. That's be-
cause I want to do stuff with the original CGImage embedded in the UIIma-
ge before I make the save."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Aug 15, 2009 1:38 am    Post subject: Reply with quote

iphonedevsdk.com - Rounded corners to images

"You can also clip the imageView to a path. Ms Sadun has a good recipe
on page 52 of her book for clipping a view to a circular path, but can be
modified to clip corners."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Fri Aug 28, 2009 4:43 pm    Post subject: Reply with quote

so - Memory management when using UIImage

"My application heavily uses the UIImage object to change images on a sin-
gle UIImageView based on user input and the previous image which was set.
I use [UIImage imageNamed:] to create my UIImage objects.

I guess this is not the best way to use UIImage coz my memory usage ke-
eps increasing with time and never drops."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Wed Oct 28, 2009 12:42 pm    Post subject: Reply with quote

MF - Cocoa/Objective-C: crop and save an image

RD: "I would suggest that you can use addRepresentation: and add a
NSBitmapImageRep (or check if there is one first). Once you have an
NSImageBimapRep you can use representationUsingTyperoperties: with
NSPNGFileType and nil properties to get PNG data to write to a file."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Nov 07, 2009 7:40 pm    Post subject: Reply with quote

MF - Data binding is deprecated?

"This is related to binding the imageWell under the data binding. If the data
binding is indeed deprecated then what do I use?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Apr 16, 2010 9:36 pm    Post subject: Reply with quote

SO - Faster way to draw an image

"I'm trying to combine two images into a single image. unfortunately this
has to be done very quickly in response to a user sliding a UISlider. i can
combine the two images into a single image no problem. but the way I'm
doing it is horribly slow."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue May 11, 2010 7:23 pm    Post subject: Reply with quote

MF - NSImage Built-In Images Reference

"For example when you use [NSImage imageNamed:@"NSInfo"], you
will get an image of an i inside a blue circle. In interface builder, the Me-
dia browser lists some of these, though the list is hardly exhaustive."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed May 26, 2010 11:23 pm    Post subject: Reply with quote

MF - Universal (iPhone / iPod touch / iPad) applications: handling images

"Use high res bitmap images and scale down based on display size (or multiplier)
Use vector based graphics"
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Wed Jul 21, 2010 10:16 pm    Post subject: Reply with quote

so - iPhone iOS 4.0 Camera FigCreateCGImageFromJPEG
returned -1


"Hi, Since I updated to 4.0, when I take a photo with my App using
UIImagePickerController I get the following error output:

* ERROR: FigCreateCGImageFromJPEG returned -1. Input (null) was
711733 bytes."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Sep 29, 2010 11:11 pm    Post subject: Reply with quote

Scott Means - iPhone programming: fun with grayscale images

"So I was trying to do something that I thought was simple. I needed to
convert an image from full color to grayscale in my iPhone application, and
I easily found the CGColorSpaceCreateDeviceGray method which seemed
to put me on the right track. But the complication came when I tried to use
this color space with CGBitmapContextCreate. I got this error in the console:

<Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component;
16 bits/pixel; 1-component colorspace; kCGImageAlphaPremultipliedLast; 1472 bytes/row.


So the combination of parameters was incorrect."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Oct 04, 2010 9:33 pm    Post subject: Reply with quote

iphonedevsdk.com - Getting GPS data from Image Exif

"I`m thinking that the UIImage that came from the picker don`t have exif
meta data, I`m right? This lib can`t be used with image picker?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Oct 07, 2010 12:58 am    Post subject: Reply with quote

so - CGContextDrawImage draws image upside down when passed
UIImage.CGImage


"I'm pretty sure this has something to do with the UI image holding onto
knowledge of the orientation while the CGContextDrawImage method gets
the underlying raw image data with no understanding of orientation."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Oct 09, 2010 1:00 am    Post subject: Reply with quote

Jeff LaMarche - Cutting Large Images into Tiles for UIScrollView

"Tile Cutter is rather bare bones and was developed in about a half-day, but
it seems to work well. I was able to slice up a 1.3 gig image (yes, really) into
400x400 chunks in about 15 minutes on my laptop."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Nov 12, 2010 4:05 pm    Post subject: Reply with quote

iphonedevsdk.com - NSOperation necessary with UIImageWriteToSavedPhotosAlbum?

"That method is already asynchronous. You just need to pass a completion
target and completion selector in, and you will be notified once the write is
finished."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Dec 03, 2010 12:13 am    Post subject: Reply with quote

Jeff LaMarche - Drawing Part of a UIImage

"On the Mac, NSImage has a handy instance method called drawInRect:-
fromRect:operation:fraction: that lets you specify exactly which part of an
image to draw. On UIImage, we've only got the ability to draw the entire
image either unless we drop down to Core Graphics calls. We don't have
a nice, easy, convenient way using just UIImage to draw a portion of the
image it represents."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Sun Jan 09, 2011 11:25 pm    Post subject: Reply with quote

MF - How to slice image to tiles?

"I found a AnimatedGif class on Internet, do you think which way is better?
UIWebView or AnimatedGif?"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Feb 07, 2011 9:07 pm    Post subject: Reply with quote

MF - How to use UIImage to resize as background

"Try using setBackgroundImage:forState: instead, as seen in the UICatalog
sample code.
...
When used in conjuction with stretchableImageWithLeftCapWidth:topCap-
Height:, only the center part of the image will scale."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Mar 03, 2011 7:04 pm    Post subject: Reply with quote

MF - NSImage size?

"An NSImage's size property takes resolution (PPI) into account.

If you want dimensions in pixels, then you need an NSImageRep and its
pixelsHigh and pixelsWide methods."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Mar 09, 2011 4:00 pm    Post subject: Reply with quote

http://stackoverflow.com/questions/5224442/uiimageviews-and-related-view-controllers-for-photo-gallery
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Apr 06, 2011 4:02 pm    Post subject: Reply with quote

MF - small UIImageView display large UIImage : memroy usage?

"It sounds like you want to be using a CATileLayer anyway. It will allow you
to adjust which image to use for the UIImageView's scale factor."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue May 24, 2011 9:27 am    Post subject: Reply with quote

github.com - Moodstocks / moodstocks-iphone-sdk

"A library to integrate image recognition into your iPhone mobile applications
in seconds."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Aug 15, 2011 12:14 pm    Post subject: Reply with quote

github.com - SDWebImage

"Asynchronous image downloader with cache support with an UIImageView
category"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Fri Mar 23, 2012 4:40 pm    Post subject: Reply with quote

Bob McCune - iOS 5 Face Detection with Core Image

"One of the great new features of iOS 5 is the addition of the Core Image
(CI) framework. This framework has been available for a few years on the
Mac, but now its advanced image processing and filtering capabilities are
available on the iOS platform as well"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Apr 25, 2012 9:57 pm    Post subject: Reply with quote

J. Duncan Davidson - WebKit Limit on Retina JPG Image Display

"Bottom line, however, is that there’s a limit to serving up web images in
JPG format with WebKit the new iPad and the limit kicks in when you ap-
proach screen-filling resolutions. Hopefully, a future update can lift the
limits just a bit so that it’s possible to display full-screen images in Safari
that look as great as full-screen images do elsewhere on the system."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri May 04, 2012 10:34 pm    Post subject: Reply with quote

mf - Why UIImageView not round corner?

I have a UIImageView on UIView, I use code as below to draw round corner,
but it doesn't work, what can I do?

Code:
    self.icon.image = [UIImage imageNamed:@"icon-72.png"];
    self.icon.layer.masksToBounds = YES;
    self.icon.layer.cornerRadius = 10.632f;
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Sep 24, 2012 3:48 pm    Post subject: Reply with quote

Trevor’s Bike Shed - Resize a UIImage the right way

"The following sections describe yet another collection of source code for
resizing UIImage objects. Functionally, it is similar to code samples that
can be found elsewhere on the Internet in discussion forums and blogs,
but it consolidates their features into a self-contained, reusable package
and offers several notable improvements..."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Jan 03, 2013 1:20 am    Post subject: Reply with quote

Swipe Through Images

http://forums.macrumors.com/showthread.php?t=1517376


I have a uicollectionview that shows the newest 50 images from a Flickr page. I can tap a thumbnail cell and show a larger image. Everything works just fine but I can't figure out how to simply swipe through the images once I've tapped on one.
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Jul 31, 2013 5:39 pm    Post subject: Reply with quote

Andrey Chevozerov - Tips for Using UIImage Objective-C Class

"Today, I'm going to suggest several unusual ways of using UIImage to
fill an area with a texture, create a stretchable UI element, changing and
masking an image."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Aug 12, 2013 11:57 pm    Post subject: Reply with quote

Johannes Treitz - The algorithm for a perfectly balanced photo gallery

"Ever since we started working on Chromatic we knew we wanted the photos
to be as big as possible. No tiny thumbnails, no square-cropping, no wasting
of precious screen real estate.

Galleries typically have between 10 and 100 photos with various aspect ra-
tios (that's width divided by height) and we want them to be equally distri-
buted over the rows, taking up all the space available."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Jan 19, 2015 11:53 pm    Post subject: Reply with quote

r - HOW-TO: Finding the distance from camera to object in image

"To to do this, we’ll convert the image to grayscale, blur it slightly to remove
high frequency noise, and apply edge detection..."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Tue May 23, 2017 8:45 am    Post subject: Reply with quote

https://www.reddit.com/r/iOSProgramming/comments/6cnx81/realtime_object_detection_with_yolo_on_ios_very/
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Feb 02, 2018 6:08 pm    Post subject: Reply with quote

git - SDWebImage

"This library provides an async image downloader with cache support.
For convenience, we added categories for UI elements like UIImageView,
UIButton, MKAnnotationView.

Categories for UIImageView, UIButton, MKAnnotationView adding web image and cache management
An asynchronous image downloader
An asynchronous memory + disk image caching with automatic cache expiration handling

* background image decompression
* guarantee that the same URL won't be downloaded several times
* guarantee that bogus URLs won't be retried again and again
* guarantee that main thread will never be blocked
Performances!

Use GCD and ARC"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Jun 15, 2019 11:26 pm    Post subject: Reply with quote

https://blog.schiavo.me/posts/scanning-documents/

Scanning documents with Vision and VisionKit on iOS 13

In iOS 13, Apple's Vision framework also adds support for OCR (Optical
Character Recognition), which allows you to detect and recognize text on
scanned documents!

git - WeScan framework

"Objective-C:

Create a dummy swift class in your project. When Xcode asks if you'd like to
create a bridging header, press 'Create Bridging Header'
In the new header, add the Objective-C class (#import myClass.h) where
you want to use WeScan
In your class, import the header (import <yourProjectName.swift.h>)
Drag and drop the WeScan folder to add it to your project
In your class, add @Class ImageScannerController;"


Read more about it: Adding document scanning to your app with WeScan/

Tesseract on git: Pocket-OCR

"This project is a demonstration of implementing the Tesseract OCR engine on
the iPhone platform. It works best with the iPhone 3GS and it's autofocus lens.
External lenses for older iPhones may be necessary for optimal image capture."


git - Tesseract OCR iOS

"Use Tesseract OCR in iOS 9.0+ projects written in either Objective-C or
Swift. Easy and fast."
[/url][/b]


Last edited by Ike on Sat Jun 17, 2023 9:27 pm; edited 4 times in total
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Oct 18, 2019 6:49 pm    Post subject: Reply with quote

git - NYTPhotoViewer

"NYTPhotoViewer is a slideshow and image viewer that includes double-tap
to zoom, captions, support for multiple images, interactive flick to dismiss,
animated zooming presentation, and more."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Jul 17, 2021 10:24 pm    Post subject: Reply with quote

git - Public domain image loader

"JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib)
PNG 1/2/4/8/16-bit-per-channel
TGA (not sure what subset, if a subset)
BMP non-1bpp, non-RLE
PSD (composited view only, no extra channels, 8/16 bit-per-channel)
GIF (*comp always reports as 4-channel)
HDR (radiance rgbE format)
PIC (Softimage PIC)
PNM (PPM and PGM binary only)"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Aug 09, 2023 2:38 pm    Post subject: Reply with quote

so - Images in NSButton and NSImageView Blurred

"NSImage doesn't have any concept of high resolution - it just uses the
smallest image that has more pixels than the space it has to fill - so if your
NSImageView is bigger in dimension than your 1x image it will use the 2x
image as it has more pixels."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Dec 23, 2023 7:51 pm    Post subject: Reply with quote

so - UISegmentedControl with Image and Title

"I decided to add the text directly onto the UIImageView like this: ..."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Apr 29, 2024 8:41 pm    Post subject: Reply with quote

so - Vertical flip of CGContext

Code:
+ (UIImage *) flipImageVertically:(UIImage *)originalImage {
    UIImageView *tempImageView = [[UIImageView alloc] initWithImage:originalImage];

    UIGraphicsBeginImageContext(tempImageView.frame.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGAffineTransform flipVertical = CGAffineTransformMake(
            1, 0, 0, -1, 0, tempImageView.frame.size.height
    );
    CGContextConcatCTM(context, flipVertical); 

    [tempImageView.layer renderInContext:context];

    UIImage *flipedImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    [tempImageView release];

    return flipedImage;
}   
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group